public class AddDatasourceCommand extends AbstractResourcePathCommand<org.hawkular.cmdgw.api.AddDatasourceRequest,org.hawkular.cmdgw.api.AddDatasourceResponse> implements SubsystemDatasourceConstants.DatasourceNodeConstants, SubsystemDatasourceConstants.XaDatasourceNodeConstants, SubsystemDatasourceConstants
SubsystemDatasourceConstants.DatasourceNodeCommonConstants, SubsystemDatasourceConstants.DatasourceNodeConstants, SubsystemDatasourceConstants.JdbcDriverNodeConstants, SubsystemDatasourceConstants.XaDatasourceNodeConstants| Modifier and Type | Field and Description |
|---|---|
static Class<org.hawkular.cmdgw.api.AddDatasourceRequest> |
REQUEST_CLASS |
entityType, operationNameCONNECTION_URL, DRIVER_CLASSSECURITY_DOMAIN, XA_DATASOURCE_CLASSDRIVER_NAME, JNDI_NAME, NAME, PASSWORD, USER_NAMECONNECTION_PROPERTIES, DATASOURCE, DATASOURCES, JDBC_DRIVER, XA_DATASOURCE, XA_DATASOURCE_PROPERTIES| Constructor and Description |
|---|
AddDatasourceCommand() |
| Modifier and Type | Method and Description |
|---|---|
protected org.hawkular.cmdgw.api.AddDatasourceResponse |
createResponse() |
protected void |
execute(org.jboss.as.controller.client.ModelControllerClient controllerClient,
ManagedServer managedServer,
String modelNodePath,
org.hawkular.bus.common.BasicMessageWithExtraData<org.hawkular.cmdgw.api.AddDatasourceRequest> envelope,
org.hawkular.cmdgw.api.AddDatasourceResponse response,
CommandContext context)
Do whatever with the already validated parameters.
|
protected void |
success(org.hawkular.bus.common.BasicMessageWithExtraData<org.hawkular.cmdgw.api.AddDatasourceRequest> envelope,
org.hawkular.cmdgw.api.AddDatasourceResponse response) |
protected void |
validate(org.hawkular.bus.common.BasicMessageWithExtraData<org.hawkular.cmdgw.api.AddDatasourceRequest> envelope,
String managedServerName,
ManagedServer managedServer)
|
protected void |
validate(String modelNodePath,
org.hawkular.bus.common.BasicMessageWithExtraData<org.hawkular.cmdgw.api.AddDatasourceRequest> envelope)
modelNodePath validation for subclasses. |
assertLocalOrRemoteServer, assertLocalServer, assertNotRename, createControllerClient, execute, getOperationName, validatepublic static final Class<org.hawkular.cmdgw.api.AddDatasourceRequest> REQUEST_CLASS
protected org.hawkular.cmdgw.api.AddDatasourceResponse createResponse()
createResponse in class AbstractResourcePathCommand<org.hawkular.cmdgw.api.AddDatasourceRequest,org.hawkular.cmdgw.api.AddDatasourceResponse>ResourcePathResponse subclassAbstractResourcePathCommand.createResponse()protected void execute(org.jboss.as.controller.client.ModelControllerClient controllerClient,
ManagedServer managedServer,
String modelNodePath,
org.hawkular.bus.common.BasicMessageWithExtraData<org.hawkular.cmdgw.api.AddDatasourceRequest> envelope,
org.hawkular.cmdgw.api.AddDatasourceResponse response,
CommandContext context)
throws Exception
AbstractResourcePathCommandexecute in class AbstractResourcePathCommand<org.hawkular.cmdgw.api.AddDatasourceRequest,org.hawkular.cmdgw.api.AddDatasourceResponse>controllerClient - a subclass of JBossASClient returned by
AbstractResourcePathCommand.createControllerClient(ManagedServer, CommandContext)managedServer - a ManagedServer instance acquired from ResourcePathRequest.getResourcePath()modelNodePath - a DMR path acquired from ResourcePathRequest.getResourcePath()envelope - the requestresponse - the responsecontext - the CommandContextException - if anything goes wrongorg.hawkular.agent.monitor.cmd.AbstractResourcePathCommand#execute(org.hawkular.dmrclient.JBossASClient,
org.hawkular.agent.monitor.inventory.ManagedServer, java.lang.String,
org.hawkular.cmdgw.api.ResourcePathRequest, org.hawkular.cmdgw.api.ResourcePathResponse,
org.hawkular.agent.monitor.cmd.CommandContext)protected void success(org.hawkular.bus.common.BasicMessageWithExtraData<org.hawkular.cmdgw.api.AddDatasourceRequest> envelope,
org.hawkular.cmdgw.api.AddDatasourceResponse response)
success in class AbstractResourcePathCommand<org.hawkular.cmdgw.api.AddDatasourceRequest,org.hawkular.cmdgw.api.AddDatasourceResponse>protected void validate(org.hawkular.bus.common.BasicMessageWithExtraData<org.hawkular.cmdgw.api.AddDatasourceRequest> envelope,
String managedServerName,
ManagedServer managedServer)
AbstractResourcePathCommandvalidate in class AbstractResourcePathCommand<org.hawkular.cmdgw.api.AddDatasourceRequest,org.hawkular.cmdgw.api.AddDatasourceResponse>managedServerName - the name of the managedServermanagedServer - the managed server to validateprotected void validate(String modelNodePath, org.hawkular.bus.common.BasicMessageWithExtraData<org.hawkular.cmdgw.api.AddDatasourceRequest> envelope)
AbstractResourcePathCommandmodelNodePath validation for subclasses.validate in class AbstractResourcePathCommand<org.hawkular.cmdgw.api.AddDatasourceRequest,org.hawkular.cmdgw.api.AddDatasourceResponse>modelNodePath - a DMR path to checkenvelope - the request the modelNodePath comes fromorg.hawkular.agent.monitor.cmd.AbstractResourcePathCommand#validate(java.lang.String,
org.hawkular.cmdgw.api.ResourcePathRequest)Copyright © 2015 Red Hat, Inc.. All rights reserved.