Class AnnotationBasedEventListenerAdapter

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, EventListener, StoppableEventListener, ThreadAwareEventListener, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

    public class AnnotationBasedEventListenerAdapter
    extends java.lang.Object
    implements StoppableEventListener, ThreadAwareEventListener, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
    AnnotationBasedEventListenerAdapter
    Version:
    $Id: $
    Author:
    brozow
    • Constructor Detail

      • AnnotationBasedEventListenerAdapter

        public AnnotationBasedEventListenerAdapter​(java.lang.String name,
                                                   java.lang.Object annotatedListener,
                                                   EventSubscriptionService subscriptionService)

        Constructor for AnnotationBasedEventListenerAdapter.

        Parameters:
        name - a String object.
        annotatedListener - a Object object.
        subscriptionService - a EventSubscriptionService object.
      • AnnotationBasedEventListenerAdapter

        public AnnotationBasedEventListenerAdapter​(java.lang.Object annotatedListener,
                                                   EventSubscriptionService subscriptionService)

        Constructor for AnnotationBasedEventListenerAdapter.

        Parameters:
        annotatedListener - a Object object.
        subscriptionService - a EventSubscriptionService object.
      • AnnotationBasedEventListenerAdapter

        public AnnotationBasedEventListenerAdapter()

        Constructor for AnnotationBasedEventListenerAdapter.

    • Method Detail

      • getName

        public java.lang.String getName()

        getName

        Specified by:
        getName in interface EventListener
        Returns:
        a String object.
      • setName

        public void setName​(java.lang.String name)

        setName

        Parameters:
        name - a String object.
      • getLogPrefix

        public java.lang.String getLogPrefix()

        getLogPrefix

        Returns:
        the logPrefix
      • setLogPrefix

        public void setLogPrefix​(java.lang.String logPrefix)

        setLogPrefix

        Parameters:
        logPrefix - the logPrefix to set
      • postprocessEvent

        protected void postprocessEvent​(IEvent event)
                                 throws java.lang.IllegalAccessException,
                                        java.lang.reflect.InvocationTargetException

        postprocessEvent

        Parameters:
        event - a IEvent object.
        Throws:
        java.lang.IllegalAccessException - if any.
        java.lang.reflect.InvocationTargetException - if any.
      • processEvent

        protected void processEvent​(IEvent event,
                                    java.lang.reflect.Method method)
                             throws java.lang.IllegalAccessException,
                                    java.lang.reflect.InvocationTargetException

        processEvent

        Parameters:
        event - a IEvent object.
        method - a Method object.
        Throws:
        java.lang.IllegalAccessException - if any.
        java.lang.reflect.InvocationTargetException - if any.
      • preprocessEvent

        protected void preprocessEvent​(IEvent event)
                                throws java.lang.IllegalAccessException,
                                       java.lang.reflect.InvocationTargetException

        preprocessEvent

        Parameters:
        event - a IEvent object.
        Throws:
        java.lang.IllegalAccessException - if any.
        java.lang.reflect.InvocationTargetException - if any.
      • handleException

        protected void handleException​(IEvent event,
                                       java.lang.Throwable cause)

        handleException

        Parameters:
        event - a IEvent object.
        cause - a Throwable object.
      • setAnnotatedListener

        public void setAnnotatedListener​(java.lang.Object annotatedListener)

        setAnnotatedListener

        Parameters:
        annotatedListener - a Object object.
      • afterPropertiesSet

        public void afterPropertiesSet()

        afterPropertiesSet

        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • close

        public void close()

        stop

        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface StoppableEventListener
      • destroy

        public void destroy()
                     throws java.lang.Exception

        destroy

        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        java.lang.Exception - if any.