Class AbstractAnnotationRegistry

java.lang.Object
org.openspaces.core.space.AbstractAnnotationRegistry
Direct Known Subclasses:
ModeAnnotationRegistry, SpaceStatusChangedAnnotationRegistry

public abstract class AbstractAnnotationRegistry extends Object
  • Constructor Details

    • AbstractAnnotationRegistry

      public AbstractAnnotationRegistry()
  • Method Details

    • registerAnnotation

      public void registerAnnotation(Class<?> annotation, Object object, Method method) throws IllegalArgumentException
      Registers the bean as a listener for a event specified by the annotation. When an event fires the specified bean method will be invoked.
      Parameters:
      annotation - The annotation that specifies the event the bean is registered to.
      object - The bean instance.
      method - The bean's method to invoke when the event fires.
      Throws:
      IllegalArgumentException - When the specified method has invalid arguments or annotation
    • validateMethod

      protected abstract void validateMethod(Class<?> annotation, Method method)
    • fireEvent

      protected void fireEvent(Class<?> annotationClass, Object event)
      Invokes the registered beans' methods passing them the space mode change event.
      Parameters:
      annotationClass - - the annotation class of the event
      event - The event to pass to the methods in case they expect a parameter.