org.springframework.transaction.event

## Class TransactionalEventListenerFactory

- java.lang.Object
- - org.springframework.transaction.event.TransactionalEventListenerFactory

- All Implemented Interfaces:
    EventListenerFactory, Ordered

      public class TransactionalEventListenerFactory
      extends Object
      implements EventListenerFactory, Ordered

  `EventListenerFactory` implementation that handles `TransactionalEventListener` annotated methods.
  Since:
    4.2
  Author:
    Stephane Nicoll
  See Also:
    `TransactionalApplicationListenerMethodAdapter`

- - ### Field Summary

    - ### Fields inherited from interface org.springframework.core.Ordered

      `HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TransactionalEventListenerFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ApplicationListener<?>` | `createApplicationListener(String beanName, Class<?> type, Method method)` Create an `ApplicationListener` for the specified method.
    `int` | `getOrder()` Get the order value of this object.
    `void` | `setOrder(int order)`
    `boolean` | `supportsMethod(Method method)` Specify if this factory supports the specified `Method`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TransactionalEventListenerFactory

          public TransactionalEventListenerFactory()

  - ### Method Detail

    - #### setOrder

          public void setOrder(int order)

    - #### getOrder

          public int getOrder()

      Description copied from interface: `Ordered`
      Get the order value of this object.

      Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet `load-on-startup` values).

      Same order values will result in arbitrary sort positions for the affected objects.

      Specified by:
        `getOrder` in interface `Ordered`
      Returns:
        the order value
      See Also:
        `Ordered.HIGHEST_PRECEDENCE`, `Ordered.LOWEST_PRECEDENCE`

    - #### supportsMethod

          public boolean supportsMethod(Method method)

      Description copied from interface: `EventListenerFactory`
      Specify if this factory supports the specified `Method`.
      Specified by:
        `supportsMethod` in interface `EventListenerFactory`
      Parameters:
        `method` - an `EventListener` annotated method
      Returns:
        `true` if this factory supports the specified method

    - #### createApplicationListener

          public ApplicationListener<?> createApplicationListener(String beanName,
                                                                  Class<?> type,
                                                                  Method method)

      Description copied from interface: `EventListenerFactory`
      Create an `ApplicationListener` for the specified method.
      Specified by:
        `createApplicationListener` in interface `EventListenerFactory`
      Parameters:
        `beanName` - the name of the bean
        `type` - the target type of the instance
        `method` - the `EventListener` annotated method
      Returns:
        an application listener, suitable to invoke the specified method