Interface ResourceOperationRuntimeHandler

All Known Implementing Classes:
ResourceOperationRuntimeHandler.ResourceServiceConfiguratorRuntimeHandler, ResourceOperationRuntimeHandler.RestartAncestorResourceServiceConfiguratorRuntimeHandler

public interface ResourceOperationRuntimeHandler
Handles runtime/rollback behavior for "add"/"remove" resource and "write-attribute" operations.
Author:
Paul Ferraro
  • Method Details

    • configureService

      static ResourceOperationRuntimeHandler configureService(ResourceServiceConfigurator configurator)
      Returns a ResourceOperationRuntimeHandler that 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 a ResourceOperationRuntimeHandler for 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 a ResourceOperationRuntimeHandler that 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 a ResourceOperationRuntimeHandler that restarts the runtime behavior of an ancestor resource.
      Parameters:
      ancestorRuntimeHandler - the runtime handler of an ancestor resource
      ancestorAddressResolver - the resolver of the ancestor path address
      Returns:
      an operation runtime handler
    • combine

      Composes a ResourceOperationRuntimeHandler from multiple runtime handlers.
      Parameters:
      handlers - a number of runtime handlers
      Returns:
      a composite runtime handler
    • combine

      Composes a ResourceOperationRuntimeHandler from 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.OperationFailedException
      Adds runtime behavior for the specified resource.
      Parameters:
      context - the context of the operation
      resource - 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.OperationFailedException
      Adds runtime behavior for a resource with the specified model.
      Parameters:
      context - the context of the operation
      model - 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.OperationFailedException
      Removes runtime behavior for the specified resource.
      Parameters:
      context - the context of the operation
      resource - 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.OperationFailedException
      Removes runtime behavior for a resource with the specified model.
      Parameters:
      context - the context of the operation
      model - 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