public class CoreJBossASClient extends JBossASClient
| Modifier and Type | Field and Description |
|---|---|
static String |
CORE_SERVICE |
static String |
CORE_SERVICE_MGMT |
static String |
DEPLOYMENT_SCANNER |
static String |
EXTENSION |
static String |
MGMT_INTERFACE |
static String |
MGMT_INTERFACE_HTTP |
static String |
MODULE |
static String |
PLATFORM_MBEAN |
static String |
SCANNER |
static String |
SERVER_ENVIRONMENT |
ADD, ADDRESS, BATCH, BATCH_STEPS, FAILURE_DESCRIPTION, log, NAME, OPERATION, OUTCOME, OUTCOME_SUCCESS, PERSISTENT, READ_ATTRIBUTE, READ_RESOURCE, REMOVE, RESULT, SUBSYSTEM, SYSTEM_PROPERTY, VALUE, WRITE_ATTRIBUTE| Constructor and Description |
|---|
CoreJBossASClient(org.jboss.as.controller.client.ModelControllerClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
addExtension(String name)
Adds a new module extension to the core system.
|
void |
addSubsystem(String name)
Adds a new subsystem to the core system.
|
void |
addSubsystem(String name,
org.jboss.dmr.ModelNode settings)
Adds a new subsystem (along with some optional settings for that subsystem) to the core system
If settings is null, the subsystem will be created with no additional settings associated with it.
|
String |
getAppServerBaseDir() |
String |
getAppServerConfigDir() |
String |
getAppServerDataDir() |
String |
getAppServerDefaultDeploymentDir()
Returns the location where the default deployment scanner is pointing to.
|
String |
getAppServerHomeDir() |
String |
getAppServerLogDir() |
String |
getAppServerTmpDir() |
String |
getAppServerVersion() |
String |
getOperatingSystem() |
String |
getServerProductName() |
String |
getServerProductVersion() |
Properties |
getSystemProperties()
This returns the system properties that are set in the AS JVM.
|
boolean |
isExtension(String name)
Returns true if the given extension is already in existence.
|
boolean |
isSubsystem(String name)
Returns true if the given subsystem is already in existence.
|
void |
reload()
Invokes the management "reload" operation which will shut down all the app server services and
restart them again.
|
void |
reload(boolean adminOnly)
Invokes the management "reload" operation which will shut down all the app server services and
restart them again potentially in admin-only mode.
|
String |
resolveExpression(String expression)
Given a string with possible ${x} expressions in it, this will resolve that expression
using system property values that are set within the AS JVM itself.
|
void |
restart()
Invokes the management "shutdown" operation with the restart option set to true
(see
shutdown(boolean)). |
void |
setAppServerDefaultDeploymentScanEnabled(boolean enabled)
Enabled or disables the default deployment scanner.
|
void |
setAppServerDefaultDeploymentScanInterval(long millis)
Sets the interval of the default deployment scanner.
|
void |
setAppServerDefaultDeploymentTimeout(long secs)
Sets the deployment timeout of the default deployment scanner.
|
void |
setEnableAdminConsole(boolean enableFlag)
Allows the caller to turn on or off complete access for the app server's admin console.
|
void |
setSystemProperty(String name,
String value)
Set a runtime system property in the JVM that is managed by JBossAS.
|
void |
shutdown(boolean restart)
Invokes the management "shutdown" operation that kills the JVM completely with System.exit.
|
createBatchRequest, createReadAttributeRequest, createReadAttributeRequest, createRequest, createRequest, createWriteAttributeRequest, execute, findNodeInList, getFailureDescription, getModelControllerClient, getResultListAsStrings, getResults, getStringAttribute, getStringAttribute, isSuccess, readResource, readResource, remove, setPossibleExpressionpublic static final String CORE_SERVICE
public static final String SERVER_ENVIRONMENT
public static final String PLATFORM_MBEAN
public static final String DEPLOYMENT_SCANNER
public static final String SCANNER
public static final String EXTENSION
public static final String MODULE
public static final String CORE_SERVICE_MGMT
public static final String MGMT_INTERFACE
public static final String MGMT_INTERFACE_HTTP
public CoreJBossASClient(org.jboss.as.controller.client.ModelControllerClient client)
public void setEnableAdminConsole(boolean enableFlag)
throws Exception
enableFlag - true if the admin console enabled and visible; false if you want to prohibit all access to the admin consoleExceptionpublic String resolveExpression(String expression) throws Exception
expression is null).expression - string containing zero, one or more ${x} expressions to be resolvedException - if failed to resolve the expression.public Properties getSystemProperties() throws Exception
Exceptionpublic void setAppServerDefaultDeploymentScanEnabled(boolean enabled)
throws Exception
enabled - the new status to be setExceptionpublic String getAppServerDefaultDeploymentDir() throws Exception
Exceptionpublic void setAppServerDefaultDeploymentScanInterval(long millis)
throws Exception
millis - number of milliseconds to periodically scan the deployment directoryExceptionpublic void setAppServerDefaultDeploymentTimeout(long secs)
throws Exception
secs - number of seconds the app server will wait for a deployment to finishExceptionpublic void setSystemProperty(String name, String value) throws Exception
name - value - Exceptionpublic void addExtension(String name) throws Exception
name - the name of the new module extensionExceptionpublic boolean isExtension(String name) throws Exception
name - the name of the extension to checkExceptionpublic void addSubsystem(String name) throws Exception
name - the name of the new subsystemExceptionpublic void addSubsystem(String name, org.jboss.dmr.ModelNode settings) throws Exception
name - the name of the new subsystemsettings - a node with some additional settings used to initialize the subsystemExceptionpublic boolean isSubsystem(String name) throws Exception
name - the name of the subsystem to checkExceptionpublic void reload()
throws Exception
client.Exceptionpublic void reload(boolean adminOnly)
throws Exception
client.adminOnly - if true, reloads the server in admin-only modeExceptionpublic void restart()
throws Exception
shutdown(boolean)).
This means the app server JVM will shutdown but immediately be restarted.
Note that the caller may not be returned to since the JVM in which this call is made
will be killed and if the client is co-located with the server JVM, this client will
also die.
NOTE: even if this method returns, the client is unusable since the server side
will shutdown the connection. You will need to throw away this object and rebuild
another one with a newly reconnected client.Exceptionpublic void shutdown(boolean restart)
throws Exception
client.restart - if true, the JVM will be restartedExceptionCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.