Annotation Type Stop


@Target(METHOD) @Retention(CLASS) public @interface Stop
Method level annotation that indicates a (no-param) method to be called on a component registered in the component registry when the registry stops.

Since:
4.0
Author:
Manik Surtani (manik@jboss.org)
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 10.0, will be removed in a future version.
  • Element Details

    • priority

      @Deprecated(forRemoval=true) int priority
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 10.0, will be removed in a future version.
      Optional parameter which defines the order in which this method will be called when a component has more than one method annotated with Stop. Defaults to 10.

      A component's stop methods usually run only when the component registry is stopped, and the component stop order is the reverse of their start order.

      Stop methods defined (and annotated) in superclasses will run after the stop methods defined in derived classes.

      Note: Prior to 9.4, priority parameter allowed the stop methods of one component to run before or after the stop methods of another component. Since 9.4, the priority parameter is ignored unless the component has multiple stop methods.

      Since:
      4.0
      Default:
      10