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 |
static OperationContext.AttachmentKey<Boolean> |
SERVER_LAUNCH_KEY
Operation attachment key used when the describe operation is being invoked in order to create the operations to launch a server
|
| 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 org.jboss.dmr.ModelNode |
createAddOperation(OrderedChildTypesAttachment orderedChildTypesAttachment,
org.jboss.dmr.ModelNode address,
Resource resource,
Set<PathElement> children) |
protected void |
describe(OrderedChildTypesAttachment orderedChildTypesAttachment,
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
public static final OperationContext.AttachmentKey<Boolean> SERVER_LAUNCH_KEY
protected GenericSubsystemDescribeHandler()
protected GenericSubsystemDescribeHandler(Comparator<PathElement> comparator)
null as the handler describes children of a resource the order in which
those children are described is determined using the comparator. This allows the result to order the
add operations for the child resources.
If the comparator is null the order for the child resources is not guaranteed, other than that all
children of a given type will be processed in the order of child names returned by Resource.getChildren(String)
invoked on the parent.comparator - the comparator used to sort the child addressespublic static GenericSubsystemDescribeHandler create(Comparator<PathElement> comparator)
null as the handler describes children of a resource the order in which
those children are described is determined using the comparator. This allows the result to order the
add operations for the child resources.
If the comparator is null the order for the child resources is not guaranteed, other than that all
children of a given type will be processed in the order of child names returned by Resource.getChildren(String)
invoked on the parent.comparator - the comparator used to sort the child addressespublic void execute(OperationContext context, org.jboss.dmr.ModelNode operation) throws OperationFailedException
OperationStepHandlercontext.getFailureDescription()
must be called, or an OperationFailedException must be thrown.
If the operation succeeded and the operation provides a return value, context.getResult() should
be called and the result populated with the outcome. If the handler wishes to take further action once the result
of the overall operation execution is known, one of the
context.completeStep variants
should be called to register a callback. The callback will not be invoked if this method throws an exception.
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 OperationStepHandlercontext - the operation contextoperation - the operation being executedOperationFailedException - if the operation failed before calling context.completeStep()protected void describe(OrderedChildTypesAttachment orderedChildTypesAttachment, Resource resource, org.jboss.dmr.ModelNode address, org.jboss.dmr.ModelNode result, ImmutableManagementResourceRegistration registration)
protected org.jboss.dmr.ModelNode createAddOperation(OrderedChildTypesAttachment orderedChildTypesAttachment, org.jboss.dmr.ModelNode address, Resource resource, Set<PathElement> children)
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 DescriptionProviderlocale - the locale to use to generate any localized text used in the description.
May be null, in which case Locale.getDefault() should be usedCopyright © 2020 JBoss by Red Hat. All rights reserved.