public final class MultistepUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
MultistepUtil.OperationHandlerResolver
Resolves an
OperationStepHandler to use given a set of inputs. |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
recordOperationSteps(OperationContext context,
Map<T,org.jboss.dmr.ModelNode> operations,
Map<T,org.jboss.dmr.ModelNode> responses)
Adds a step to the given
OperationContext for each operation included in the given map, either
using for each step a response node provided in the responses map, or if the responses map is empty,
creating them and storing them in the responses map. |
static <T> void |
recordOperationSteps(OperationContext context,
Map<T,org.jboss.dmr.ModelNode> operations,
Map<T,org.jboss.dmr.ModelNode> responses,
MultistepUtil.OperationHandlerResolver handlerResolver,
boolean adjustAddresses,
boolean rejectPrivateOperations)
This is a specialized version of the other variant of this method that allows a pluggable strategy
for resolving the
OperationStepHandler to use for the added steps. |
public static <T> void recordOperationSteps(OperationContext context, Map<T,org.jboss.dmr.ModelNode> operations, Map<T,org.jboss.dmr.ModelNode> responses) throws OperationFailedException
OperationContext for each operation included in the given map, either
using for each step a response node provided in the responses map, or if the responses map is empty,
creating them and storing them in the responses map. The response objects are not tied into the overall response
to the operation associated with context. It is the responsibility of the caller to do that.
NOTE: The given operations map must provide an iterator over its entry set that provides the entries in the
order in which the operations should execute. A LinkedHashMap is the typical choice.
T - the type of the keys in the mapscontext - the OperationContext. Cannot be nulloperations - the operations, each value of which must be a proper OBJECT type model node with a structure describing an operation.responses - a map of the response nodes, the keys for which match the keys in the operations param.
Cannot be null but may be empty in which case this method will
create the response nodes and store them in this map.OperationFailedException - if there is a problem registering a step for any of the operationspublic static <T> void recordOperationSteps(OperationContext context, Map<T,org.jboss.dmr.ModelNode> operations, Map<T,org.jboss.dmr.ModelNode> responses, MultistepUtil.OperationHandlerResolver handlerResolver, boolean adjustAddresses, boolean rejectPrivateOperations) throws OperationFailedException
OperationStepHandler to use for the added steps. It is not expected to
be needed by users outside the WildFly Core kernel.T - the type of the keys in the mapscontext - the OperationContext. Cannot be nulloperations - the operations, each value of which must be a proper OBJECT type model node with a structure describing an operation.responses - a map of the response nodes, the keys for which match the keys in the operations param.
Cannot be null but may be empty in which case this method will
create the response nodes and store them in this map.handlerResolver - an object that can provide the OperationStepHandler to use for the operationadjustAddresses - true if the address of each operation should be adjusted to become a child of the context's
current addressrejectPrivateOperations - true if an OperationFailedException should be thrown if the
OperationEntry for any of the operations is
OperationEntry.EntryType#PRIVATEOperationFailedException - if there is a problem registering a step for any of the operationsCopyright © 2020 JBoss by Red Hat. All rights reserved.