public class PayaraClientService extends Object implements PayaraClient
ADMINSERVER| Constructor and Description |
|---|
PayaraClientService(CommonPayaraConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
org.jboss.arquillian.container.spi.client.protocol.metadata.HTTPContext |
doDeploy(String name,
org.glassfish.jersey.media.multipart.FormDataMultiPart form)
Do deploy an application defined by a multipart form's fileds to a target server or a cluster
of GlassFish 3.1
|
Map<String,Object> |
doUndeploy(String name,
org.glassfish.jersey.media.multipart.FormDataMultiPart form)
Undeploy the component
|
protected Map<String,String> |
getClusterAttributes(String cluster)
Get the clusterAttributes map of a cluster
|
protected String |
getHostAddress(Map<String,String> serverAttributes)
Get the HOST address (IP or name) of the node associated with the server
|
Integer |
getPayaraVersion() |
protected Map<String,String> |
getServerAttributes(String server)
Get the serverAttributes map of a server
|
protected int |
getServerInstanceHttpPort(String server,
int defaultPort,
boolean secure)
Get the http/https port number of the server instance
|
protected Map<String,String> |
getServerInstances(String target)
Get the list of server instances of the cluster
|
protected Map<String,String> |
getServerSystemProperties(String server) |
boolean |
isDASRunning()
Verify if the DAS is running or not.
|
void |
startUp()
Start-up the server
|
public PayaraClientService(CommonPayaraConfiguration configuration)
public void startUp()
throws PayaraClientException
- Get the node addresses list associated with the target - Pull the server instances status form mgm API - In case of cluster tries to fund an instance which has RUNNING status
startUp in interface PayaraClientPayaraClientExceptionpublic Integer getPayaraVersion()
public org.jboss.arquillian.container.spi.client.protocol.metadata.HTTPContext doDeploy(String name, org.glassfish.jersey.media.multipart.FormDataMultiPart form)
doDeploy in interface PayaraClientname - - name of the appliacation form - a form of MediaType.MULTIPART_FORM_DATA_TYPEform - - form containing data to be deployedpublic Map<String,Object> doUndeploy(String name, org.glassfish.jersey.media.multipart.FormDataMultiPart form)
doUndeploy in interface PayaraClientname - - application name form - form that include the target and operation fieldsform - - form containing the datapublic boolean isDASRunning()
isDASRunning in interface PayaraClientprotected Map<String,String> getServerInstances(String target)
target - the targetprotected Map<String,String> getServerAttributes(String server)
server - of the serverprotected Map<String,String> getClusterAttributes(String cluster)
cluster - of the clusterprotected String getHostAddress(Map<String,String> serverAttributes)
serverAttributes - nameprotected int getServerInstanceHttpPort(String server, int defaultPort, boolean secure)
The attribute is optional, It is generated by the Glassfish server if we have more then one server instance on the same node.
server - namedefaultPort - port used as no port foundsecure - false - http port number, true - https port numberCopyright © 2019. All rights reserved.