Interface SetupAction


public interface SetupAction
An action that sets up and tears down some form of context (e.g. the TCCL, JNDI context etc).

Implementations need to be thread safe, as multiple threads can be setting up and tearing down contexts at any given time.

Author:
Stuart Douglas
  • Method Summary

    Modifier and Type
    Method
    Description
    Set<org.jboss.msc.service.ServiceName>
    Any dependencies that this action requires
    int
    Higher priority setup actions run first
    void
    setup(Map<String,Object> properties)
    Sets up the context.
    void
    teardown(Map<String,Object> properties)
    Tears down the context that was set up and restores the previous context state.
  • Method Details

    • setup

      void setup(Map<String,Object> properties)
      Sets up the context. If this method throws an exception then the teardown(java.util.Map) method will not be called, so this method should be implmeneted in an atomic manner.
      Parameters:
      properties - data that a caller may provide to help configure the behavior of the action. May be null. An implementation that expects certain properties should either require it is only used in cases where those properties will be provided, or do something reasonable (e.g. become a no-op) if they are not provided.
    • teardown

      void teardown(Map<String,Object> properties)
      Tears down the context that was set up and restores the previous context state.
      Parameters:
      properties - data that a caller may provide to help configure the behavior of the action. May be null. An implementation that expects certain properties should either require it is only used in cases where those properties will be provided, or do something reasonable (e.g. become a no-op) if they are not provided.
    • priority

      int priority()
      Higher priority setup actions run first
      Returns:
      the priority
    • dependencies

      Set<org.jboss.msc.service.ServiceName> dependencies()
      Any dependencies that this action requires
      Returns:
      the names of the services this action requires. Will not be null.