public class MailSessionAdd extends AbstractAddStepHandler
Modifier and Type | Field and Description |
---|---|
static org.jboss.msc.service.ServiceName |
SERVICE_NAME_BASE |
Modifier | Constructor and Description |
---|---|
protected |
MailSessionAdd() |
Modifier and Type | Method and Description |
---|---|
static String |
getJndiName(org.jboss.dmr.ModelNode modelNode)
Extracts the raw JNDI_NAME value from the given model node, and depending on the value and
the value of any USE_JAVA_CONTEXT child node, converts the raw name into a compliant jndi name.
|
protected void |
performRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
org.jboss.dmr.ModelNode model,
ServiceVerificationHandler verificationHandler,
List<org.jboss.msc.service.ServiceController<?>> controllers)
Make any runtime changes necessary to effect the changes indicated by the given
operation . |
protected void |
populateModel(org.jboss.dmr.ModelNode operation,
org.jboss.dmr.ModelNode model)
Populate the given node in the persistent configuration model based on the values in the given operation.
|
execute, populateModel, populateModel, requiresRuntime, requiresRuntimeVerification, rollbackRuntime
public static final org.jboss.msc.service.ServiceName SERVICE_NAME_BASE
protected void populateModel(org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model) throws OperationFailedException
populateModel
in class AbstractAddStepHandler
operation
- the operationmodel
- persistent configuration model node that corresponds to the address of operation
OperationFailedException
- if operation
is invalid or populating the model otherwise failsprotected void performRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model, ServiceVerificationHandler verificationHandler, List<org.jboss.msc.service.ServiceController<?>> controllers) throws OperationFailedException
operation
. E
It constructs a MailSessionService that provides mail session and registers it to Naming service.
performRuntime
in class AbstractAddStepHandler
context
- the operation contextoperation
- the operation being executedmodel
- persistent configuration model node that corresponds to the address of operation
verificationHandler
- step handler that can be added as a listener to any new services installed in order to
validate the services installed correctly during the
VERIFY stage
controllers
- holder for the ServiceController
for any new services installed by the method. The
method should add the ServiceController
for any new services to this list. If the
overall operation needs to be rolled back, the list will be used in
AbstractAddStepHandler.rollbackRuntime(org.jboss.as.controller.OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode, java.util.List)
to automatically removed
the newly added servicesOperationFailedException
- if operation
is invalid or updating the runtime otherwise failspublic static String getJndiName(org.jboss.dmr.ModelNode modelNode)
modelNode
- the model node; either an operation or the model behind a mail session resourceCopyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.