public class GenericSubsystemDescribeHandler extends Object implements OperationStepHandler, DescriptionProvider
Modifier and Type | Field and Description |
---|---|
static SimpleOperationDefinition |
DEFINITION |
static Set<Action.ActionEffect> |
DESCRIBE_EFFECTS |
static GenericSubsystemDescribeHandler |
INSTANCE |
Modifier | Constructor and Description |
---|---|
protected |
GenericSubsystemDescribeHandler() |
protected |
GenericSubsystemDescribeHandler(Comparator<PathElement> comparator)
Creates a new describe handler.
|
Modifier and Type | Method and Description |
---|---|
static GenericSubsystemDescribeHandler |
create(Comparator<PathElement> comparator)
Creates a new describe handler.
|
protected org.jboss.dmr.ModelNode |
createAddOperation(org.jboss.dmr.ModelNode address,
org.jboss.dmr.ModelNode subModel,
Set<PathElement> children) |
protected void |
describe(Resource resource,
org.jboss.dmr.ModelNode address,
org.jboss.dmr.ModelNode result,
ImmutableManagementResourceRegistration registration) |
void |
execute(OperationContext context,
org.jboss.dmr.ModelNode operation)
Execute this step.
|
org.jboss.dmr.ModelNode |
getModelDescription(Locale locale)
Deprecated.
use
DEFINITION for registration of operation |
public static final GenericSubsystemDescribeHandler INSTANCE
public static final SimpleOperationDefinition DEFINITION
public static final Set<Action.ActionEffect> DESCRIBE_EFFECTS
protected GenericSubsystemDescribeHandler()
protected GenericSubsystemDescribeHandler(Comparator<PathElement> comparator)
null
the ImmutableManagementResourceRegistration.getChildAddresses(org.jboss.as.controller.PathAddress)
child addresses} from the registration are placed in a sorted collection. This allows the result to order the
add operations for the subsystem resources.
If the comparator is null
the order for the ImmutableManagementResourceRegistration.getChildAddresses(org.jboss.as.controller.PathAddress)
child addresses} is not guaranteed.comparator
- the comparator used to sort the child addressespublic static GenericSubsystemDescribeHandler create(Comparator<PathElement> comparator)
null
the ImmutableManagementResourceRegistration.getChildAddresses(org.jboss.as.controller.PathAddress)
child addresses} from the registration are placed in a sorted collection. This allows the result to order the
add operations for the subsystem resources.
If the comparator is null
the order for the ImmutableManagementResourceRegistration.getChildAddresses(org.jboss.as.controller.PathAddress)
child addresses} is not guaranteed.comparator
- the comparator used to sort the child addressespublic void execute(OperationContext context, org.jboss.dmr.ModelNode operation) throws OperationFailedException
OperationStepHandler
context.getFailureDescription()
must be called, before calling one of the
context.completeStep variants
,
or an OperationFailedException
must be thrown.
If the operation succeeded, context.getResult()
should
be called and the result populated with the outcome, after which one of the
context.completeStep variants
must be called.
When this method is invoked the thread context classloader
will
be set to be the defining class loader of the class that implements this interface.
execute
in interface OperationStepHandler
context
- the operation contextoperation
- the operation being executedOperationFailedException
- if the operation failed before calling context.completeStep()
protected void describe(Resource resource, org.jboss.dmr.ModelNode address, org.jboss.dmr.ModelNode result, ImmutableManagementResourceRegistration registration)
protected org.jboss.dmr.ModelNode createAddOperation(org.jboss.dmr.ModelNode address, org.jboss.dmr.ModelNode subModel, Set<PathElement> children)
public org.jboss.dmr.ModelNode getModelDescription(Locale locale)
DEFINITION
for registration of operationDescriptionProvider
The implementation must assume that the caller intends to modify the
returned ModelNode
so it should not hand out a reference to any internal data structures.
getModelDescription
in interface DescriptionProvider
locale
- the locale to use to generate any localized text used in the description.
May be null
, in which case Locale.getDefault()
should be usedCopyright © 2014 JBoss by Red Hat. All rights reserved.