Class PayaraClientService
- java.lang.Object
-
- fish.payara.arquillian.container.payara.clientutils.PayaraClientService
-
- All Implemented Interfaces:
PayaraClient
public class PayaraClientService extends Object implements PayaraClient
- Author:
- Z.Paulovics
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface fish.payara.arquillian.container.payara.clientutils.PayaraClient
PayaraClient.MultiPart
-
-
Field Summary
-
Fields inherited from interface fish.payara.arquillian.container.payara.clientutils.PayaraClient
ADMINSERVER
-
-
Constructor Summary
Constructors Constructor Description PayaraClientService(CommonPayaraConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jboss.arquillian.container.spi.client.protocol.metadata.HTTPContextdoDeploy(String name, PayaraClient.MultiPart form)Do deploy an application defined by a multipart form's fileds to a target server or a cluster of GlassFish 3.1Map<String,Object>doUndeploy(String name, PayaraClient.MultiPart form)Undeploy the componentprotected Map<String,String>getClusterAttributes(String cluster)Get the clusterAttributes map of a clusterprotected StringgetHostAddress(Map<String,String> serverAttributes)Get the HOST address (IP or name) of the node associated with the serverIntegergetPayaraVersion()protected Map<String,String>getServerAttributes(String server)Get the serverAttributes map of a serverprotected Map<String,String>getServerInstances(String target)Get the list of server instances of the clusterprotected Map<String,String>getServerSystemProperties(String server)booleanisDASRunning()Verify if the DAS is running or not.voidstartUp()Start-up the server
-
-
-
Constructor Detail
-
PayaraClientService
public PayaraClientService(CommonPayaraConfiguration configuration)
-
-
Method Detail
-
startUp
public void startUp() throws PayaraClientExceptionStart-up the server- 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
- Specified by:
startUpin interfacePayaraClient- Throws:
PayaraClientException
-
getPayaraVersion
public Integer getPayaraVersion()
-
doDeploy
public org.jboss.arquillian.container.spi.client.protocol.metadata.HTTPContext doDeploy(String name, PayaraClient.MultiPart form)
Do deploy an application defined by a multipart form's fileds to a target server or a cluster of GlassFish 3.1- Specified by:
doDeployin interfacePayaraClient- Parameters:
name- - name of the appliacation form - a form of MediaType.MULTIPART_FORM_DATA_TYPEform- - form containing data to be deployed- Returns:
- subComponents - a map of SubComponents of the application
-
doUndeploy
public Map<String,Object> doUndeploy(String name, PayaraClient.MultiPart form)
Undeploy the component- Specified by:
doUndeployin interfacePayaraClient- Parameters:
name- - application name form - form that include the target and operation fieldsform- - form containing the data- Returns:
- resultMap
-
isDASRunning
public boolean isDASRunning()
Verify if the DAS is running or not.- Specified by:
isDASRunningin interfacePayaraClient- Returns:
- true if the DAS is running, false otherwise
-
getServerInstances
protected Map<String,String> getServerInstances(String target)
Get the list of server instances of the cluster- Parameters:
target- the target- Returns:
- server instances map
-
getServerAttributes
protected Map<String,String> getServerAttributes(String server)
Get the serverAttributes map of a server- Parameters:
server- of the server- Returns:
- serverAttributes map nodeRef: - reference to the node object configRef: - reference to the server's configuration object ...
-
getClusterAttributes
protected Map<String,String> getClusterAttributes(String cluster)
Get the clusterAttributes map of a cluster- Parameters:
cluster- of the cluster- Returns:
- serverAttributes map configRef: - reference to the cluster's configuration object ...
-
-