Interface ResourceOperationRuntimeHandler
-
- All Known Implementing Classes:
ResourceOperationRuntimeHandler.ResourceServiceConfiguratorRuntimeHandler,ResourceOperationRuntimeHandler.RestartAncestorResourceServiceConfiguratorRuntimeHandler
public interface ResourceOperationRuntimeHandlerHandles runtime/rollback behavior for "add"/"remove" resource and "write-attribute" operations.- Author:
- Paul Ferraro
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classResourceOperationRuntimeHandler.ResourceServiceConfiguratorRuntimeHandlerPerforms installation of a single service, configured via aResourceServiceConfigurator.static classResourceOperationRuntimeHandler.RestartAncestorResourceServiceConfiguratorRuntimeHandlerRuntime handler that restarts the runtime handler of an ancestor resource.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidaddRuntime(org.jboss.as.controller.OperationContext context, org.jboss.as.controller.registry.Resource resource)Adds runtime behavior for the specified resource.voidaddRuntime(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode model)Adds runtime behavior for a resource with the specified model.static ResourceOperationRuntimeHandlercombine(Iterable<? extends ResourceOperationRuntimeHandler> handlers)Composes aResourceOperationRuntimeHandlerfrom multiple runtime handlers.static ResourceOperationRuntimeHandlercombine(ResourceOperationRuntimeHandler... handlers)Composes aResourceOperationRuntimeHandlerfrom multiple runtime handlers.static ResourceOperationRuntimeHandlerconfigureParentService(ResourceServiceConfigurator configurator)Returns aResourceOperationRuntimeHandlerfor resource with children that configures and installs a single service from the specified factory, using a recursively read model.static ResourceOperationRuntimeHandlerconfigureService(ResourceServiceConfigurator configurator)Returns aResourceOperationRuntimeHandlerthat configures and installs a single service from the specified factory.default org.jboss.dmr.ModelNodereadModel(org.jboss.as.controller.registry.Resource resource)Returns the model of the specified resource.default voidremoveRuntime(org.jboss.as.controller.OperationContext context, org.jboss.as.controller.registry.Resource resource)Removes runtime behavior for the specified resource.voidremoveRuntime(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode model)Removes runtime behavior for a resource with the specified model.static ResourceOperationRuntimeHandlerrestartAncestor(ResourceOperationRuntimeHandler ancestorRuntimeHandler, UnaryOperator<org.jboss.as.controller.PathAddress> ancestorAddressResolver)Returns aResourceOperationRuntimeHandlerthat restarts the runtime behavior of an ancestor resource.static ResourceOperationRuntimeHandlerrestartParent(ResourceOperationRuntimeHandler parentRuntimeHandler)Returns aResourceOperationRuntimeHandlerthat restarts the runtime behavior of its parent resource.
-
-
-
Method Detail
-
configureService
static ResourceOperationRuntimeHandler configureService(ResourceServiceConfigurator configurator)
Returns aResourceOperationRuntimeHandlerthat configures and installs a single service from the specified factory.- Parameters:
configurator- a service configurator- Returns:
- an operation runtime handler
-
configureParentService
static ResourceOperationRuntimeHandler configureParentService(ResourceServiceConfigurator configurator)
Returns aResourceOperationRuntimeHandlerfor resource with children that configures and installs a single service from the specified factory, using a recursively read model.- Parameters:
configurator- a service configurator- Returns:
- an operation runtime handler
-
restartParent
static ResourceOperationRuntimeHandler restartParent(ResourceOperationRuntimeHandler parentRuntimeHandler)
Returns aResourceOperationRuntimeHandlerthat restarts the runtime behavior of its parent resource.- Parameters:
parentRuntimeHandler- the runtime handler of the parent resource- Returns:
- an operation runtime handler
-
restartAncestor
static ResourceOperationRuntimeHandler restartAncestor(ResourceOperationRuntimeHandler ancestorRuntimeHandler, UnaryOperator<org.jboss.as.controller.PathAddress> ancestorAddressResolver)
Returns aResourceOperationRuntimeHandlerthat restarts the runtime behavior of an ancestor resource.- Parameters:
ancestorRuntimeHandler- the runtime handler of an ancestor resourceancestorAddressResolver- the resolver of the ancestor path address- Returns:
- an operation runtime handler
-
combine
static ResourceOperationRuntimeHandler combine(ResourceOperationRuntimeHandler... handlers)
Composes aResourceOperationRuntimeHandlerfrom multiple runtime handlers.- Parameters:
handlers- a number of runtime handlers- Returns:
- a composite runtime handler
-
combine
static ResourceOperationRuntimeHandler combine(Iterable<? extends ResourceOperationRuntimeHandler> handlers)
Composes aResourceOperationRuntimeHandlerfrom multiple runtime handlers.- Parameters:
handlers- a number of runtime handlers- Returns:
- a composite runtime handler
-
addRuntime
default void addRuntime(org.jboss.as.controller.OperationContext context, org.jboss.as.controller.registry.Resource resource) throws org.jboss.as.controller.OperationFailedExceptionAdds runtime behavior for the specified resource.- Parameters:
context- the context of the operationresource- the target resource- Throws:
org.jboss.as.controller.OperationFailedException- if the operation should fail
-
addRuntime
void addRuntime(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode model) throws org.jboss.as.controller.OperationFailedExceptionAdds runtime behavior for a resource with the specified model.- Parameters:
context- the context of the operationmodel- the resource model- Throws:
org.jboss.as.controller.OperationFailedException- if the operation should fail
-
removeRuntime
default void removeRuntime(org.jboss.as.controller.OperationContext context, org.jboss.as.controller.registry.Resource resource) throws org.jboss.as.controller.OperationFailedExceptionRemoves runtime behavior for the specified resource.- Parameters:
context- the context of the operationresource- the target resource- Throws:
org.jboss.as.controller.OperationFailedException- if the operation should fail
-
removeRuntime
void removeRuntime(org.jboss.as.controller.OperationContext context, org.jboss.dmr.ModelNode model) throws org.jboss.as.controller.OperationFailedExceptionRemoves runtime behavior for a resource with the specified model.- Parameters:
context- the context of the operationmodel- the resource model- Throws:
org.jboss.as.controller.OperationFailedException- if the operation should fail
-
readModel
default org.jboss.dmr.ModelNode readModel(org.jboss.as.controller.registry.Resource resource)
Returns the model of the specified resource. This can be overridden to provide a recursively read model.- Parameters:
resource- the resource associated with the current operation- Returns:
- the resource model
-
-