Class WildflyBaseClient
- java.lang.Object
-
- org.kie.workbench.common.screens.datasource.management.backend.integration.wildfly.WildflyBaseClient
-
- Direct Known Subclasses:
WildflyDataSourceManagementClient,WildflyDeploymentClient,WildflyDriverManagementClient
public abstract class WildflyBaseClient extends Object
Base class for Wildfly/EAP based clients.
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringadminstatic StringADMINprotected static StringDEFAULT_ADMINprotected static StringDEFAULT_ADMIN_PASSWORDprotected static StringDEFAULT_HOSTprotected static intDEFAULT_PORTprotected static StringDEFAULT_REALMprotected Stringhoststatic StringHOSTstatic StringHTTP_REMOTING_PROTOCOLstatic StringHTTPS_REMOTING_PROTOCOLstatic StringJBOSS_SERVER_NAMEprotected Stringpasswordstatic StringPASSWORDprotected intportstatic StringPORTprotected Stringprofilestatic StringPROFILEprotected Stringprotocolstatic StringPROTOCOLprotected Stringrealmstatic StringREALMstatic StringREFERENCE_SERVER_HOSTstatic StringREFERENCE_SERVER_NAMEprotected StringreferenceServerHostprotected StringreferenceServerNamestatic StringSERVER_GROUPprotected StringserverGroup
-
Constructor Summary
Constructors Constructor Description WildflyBaseClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckResponse(org.jboss.dmr.ModelNode response)Checks the outcome returned by server when an operation was executed.org.jboss.as.controller.client.ModelControllerClientcreateControllerClient()org.jboss.as.controller.client.ModelControllerClientcreateControllerClient(boolean checkConnection)List<String>getHosts()StringgetReferenceServerHost()StringgetReferenceServerName()List<String>getServers(String host)booleanisFailure(org.jboss.dmr.ModelNode response)booleanisStandalone()voidloadConfig(Properties properties)voidsafeClose(Closeable closeable)StringtestConnection()Tests the connection with the server.
-
-
-
Field Detail
-
HTTP_REMOTING_PROTOCOL
public static final String HTTP_REMOTING_PROTOCOL
- See Also:
- Constant Field Values
-
HTTPS_REMOTING_PROTOCOL
public static final String HTTPS_REMOTING_PROTOCOL
- See Also:
- Constant Field Values
-
PROTOCOL
public static final String PROTOCOL
- See Also:
- Constant Field Values
-
HOST
public static final String HOST
- See Also:
- Constant Field Values
-
PORT
public static final String PORT
- See Also:
- Constant Field Values
-
ADMIN
public static final String ADMIN
- See Also:
- Constant Field Values
-
PASSWORD
public static final String PASSWORD
- See Also:
- Constant Field Values
-
REALM
public static final String REALM
- See Also:
- Constant Field Values
-
PROFILE
public static final String PROFILE
- See Also:
- Constant Field Values
-
SERVER_GROUP
public static final String SERVER_GROUP
- See Also:
- Constant Field Values
-
REFERENCE_SERVER_HOST
public static final String REFERENCE_SERVER_HOST
- See Also:
- Constant Field Values
-
REFERENCE_SERVER_NAME
public static final String REFERENCE_SERVER_NAME
- See Also:
- Constant Field Values
-
JBOSS_SERVER_NAME
public static final String JBOSS_SERVER_NAME
- See Also:
- Constant Field Values
-
DEFAULT_HOST
protected static final String DEFAULT_HOST
- See Also:
- Constant Field Values
-
DEFAULT_PORT
protected static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
DEFAULT_ADMIN
protected static final String DEFAULT_ADMIN
-
DEFAULT_ADMIN_PASSWORD
protected static final String DEFAULT_ADMIN_PASSWORD
-
DEFAULT_REALM
protected static final String DEFAULT_REALM
- See Also:
- Constant Field Values
-
protocol
protected String protocol
-
host
protected String host
-
port
protected int port
-
admin
protected String admin
-
password
protected String password
-
realm
protected String realm
-
profile
protected String profile
-
serverGroup
protected String serverGroup
-
referenceServerHost
protected String referenceServerHost
-
referenceServerName
protected String referenceServerName
-
-
Method Detail
-
loadConfig
public void loadConfig(Properties properties)
-
createControllerClient
public org.jboss.as.controller.client.ModelControllerClient createControllerClient() throws Exception- Throws:
Exception
-
createControllerClient
public org.jboss.as.controller.client.ModelControllerClient createControllerClient(boolean checkConnection) throws Exception- Throws:
Exception
-
testConnection
public String testConnection() throws Exception
Tests the connection with the server.- Returns:
- If the connection was successfully established returns a String with the server version information.
- Throws:
Exception- If it was not possible to connect to server.
-
checkResponse
public void checkResponse(org.jboss.dmr.ModelNode response) throws ExceptionChecks the outcome returned by server when an operation was executed.- Parameters:
response- ModelNode returned by server as response.- Throws:
Exception
-
isFailure
public boolean isFailure(org.jboss.dmr.ModelNode response)
-
safeClose
public void safeClose(Closeable closeable)
-
isStandalone
public boolean isStandalone()
-
getReferenceServerName
public String getReferenceServerName()
-
getReferenceServerHost
public String getReferenceServerHost()
-
-