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, STATISTICS_ENABLED, 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 org.hawkular.bus.common.BinaryData |
execute(org.jboss.as.controller.client.ModelControllerClient controllerClient,
EndpointService<DMRNodeLocation,DMRSession> endpointService,
String modelNodePath,
org.hawkular.bus.common.BasicMessageWithExtraData<org.hawkular.cmdgw.api.AddDatasourceRequest> envelope,
org.hawkular.cmdgw.api.AddDatasourceResponse response,
CommandContext context,
DMRSession dmrContext)
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,
MonitoredEndpoint<? extends MonitorServiceConfiguration.AbstractEndpointConfiguration> endpoint)
Validation for subclasses.
|
protected void |
validate(String modelNodePath,
org.hawkular.bus.common.BasicMessageWithExtraData<org.hawkular.cmdgw.api.AddDatasourceRequest> envelope)
modelNodePath validation for subclasses. |
assertLocalServer, assertNotRename, execute, getOperationName, setServerRefreshIndicator, 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 subclassprotected org.hawkular.bus.common.BinaryData execute(org.jboss.as.controller.client.ModelControllerClient controllerClient,
EndpointService<DMRNodeLocation,DMRSession> endpointService,
String modelNodePath,
org.hawkular.bus.common.BasicMessageWithExtraData<org.hawkular.cmdgw.api.AddDatasourceRequest> envelope,
org.hawkular.cmdgw.api.AddDatasourceResponse response,
CommandContext context,
DMRSession dmrContext)
throws Exception
AbstractResourcePathCommandexecute in class AbstractResourcePathCommand<org.hawkular.cmdgw.api.AddDatasourceRequest,org.hawkular.cmdgw.api.AddDatasourceResponse>controllerClient - a plain ModelControllerClientendpointService - an EndpointService belonging to the resourcemodelNodePath - a DMR path acquired from ResourcePathRequest.getResourcePath()envelope - the requestresponse - the responsecontext - the CommandContextdmrContext - a DMRSessionBinaryData with binary content if this command returns anyException - if anything goes wrongprotected 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,
MonitoredEndpoint<? extends MonitorServiceConfiguration.AbstractEndpointConfiguration> endpoint)
AbstractResourcePathCommandvalidate in class AbstractResourcePathCommand<org.hawkular.cmdgw.api.AddDatasourceRequest,org.hawkular.cmdgw.api.AddDatasourceResponse>envelope - a DMR path to checkprotected 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 fromCopyright © 2015–2017 Red Hat, Inc.. All rights reserved.