Interface ResourceOperationRuntimeHandler
-
- All Known Implementing Classes:
ResourceOperationRuntimeHandler.ResourceServiceConfiguratorRuntimeHandler,ResourceOperationRuntimeHandler.RestartAncestorResourceServiceConfiguratorRuntimeHandler
public interface ResourceOperationRuntimeHandler- 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(OperationContext context, Resource resource)Adds runtime behavior for the specified resource.voidaddRuntime(OperationContext context, org.jboss.dmr.ModelNode model)Adds runtime behavior for a resource with the specified model.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(Resource resource)Returns the model of the specified resource.default voidremoveRuntime(OperationContext context, Resource resource)Removes runtime behavior for the specified resource.voidremoveRuntime(OperationContext context, org.jboss.dmr.ModelNode model)Removes runtime behavior for a resource with the specified model.static ResourceOperationRuntimeHandlerrestartAncestor(ResourceOperationRuntimeHandler ancestorRuntimeHandler, UnaryOperator<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<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
-
addRuntime
default void addRuntime(OperationContext context, Resource resource) throws OperationFailedException
Adds runtime behavior for the specified resource.- Parameters:
context- the context of the operationresource- the target resource- Throws:
OperationFailedException- if the operation should fail
-
addRuntime
void addRuntime(OperationContext context, org.jboss.dmr.ModelNode model) throws OperationFailedException
Adds runtime behavior for a resource with the specified model.- Parameters:
context- the context of the operationmodel- the resource model- Throws:
OperationFailedException- if the operation should fail
-
removeRuntime
default void removeRuntime(OperationContext context, Resource resource) throws OperationFailedException
Removes runtime behavior for the specified resource.- Parameters:
context- the context of the operationresource- the target resource- Throws:
OperationFailedException- if the operation should fail
-
removeRuntime
void removeRuntime(OperationContext context, org.jboss.dmr.ModelNode model) throws OperationFailedException
Removes runtime behavior for a resource with the specified model.- Parameters:
context- the context of the operationmodel- the resource model- Throws:
OperationFailedException- if the operation should fail
-
readModel
default org.jboss.dmr.ModelNode readModel(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
-
-