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:
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateApplicationListener(String beanName, Class<?> type, Method method) Create anApplicationListenerfor the specified method.intgetOrder()Get the order value of this object.voidsetOrder(int order) booleansupportsMethod(Method method) Specify if this factory supports the specifiedMethod.
-
Constructor Details
-
TransactionalEventListenerFactory
public TransactionalEventListenerFactory()
-
-
Method Details
-
setOrder
public void setOrder(int order) -
getOrder
public int getOrder()Description copied from interface:OrderedGet 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-startupvalues).Same order values will result in arbitrary sort positions for the affected objects.
-
supportsMethod
Description copied from interface:EventListenerFactorySpecify if this factory supports the specifiedMethod.- Specified by:
supportsMethodin interfaceEventListenerFactory- Parameters:
method- anEventListenerannotated method- Returns:
trueif this factory supports the specified method
-
createApplicationListener
public ApplicationListener<?> createApplicationListener(String beanName, Class<?> type, Method method) Description copied from interface:EventListenerFactoryCreate anApplicationListenerfor the specified method.- Specified by:
createApplicationListenerin interfaceEventListenerFactory- Parameters:
beanName- the name of the beantype- the target type of the instancemethod- theEventListenerannotated method- Returns:
- an application listener, suitable to invoke the specified method
-