public class AnnotatedHandlerRepositoryEventListener extends java.lang.Object implements org.springframework.context.ApplicationListener<RepositoryEvent>, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
ApplicationListener
that will dispatch RepositoryEvent
s to handlers annotated with RepositoryEventHandler
.Constructor and Description |
---|
AnnotatedHandlerRepositoryEventListener() |
AnnotatedHandlerRepositoryEventListener(java.lang.String basePackage) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
java.lang.String |
basePackage()
Get the base package in which to search for event handlers.
|
AnnotatedHandlerRepositoryEventListener |
basePackage(java.lang.String basePackage)
Set the base package in which to search for event handlers.
|
java.lang.String |
getBasePackage()
Get the base package in which to search for event handlers.
|
void |
onApplicationEvent(RepositoryEvent event) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
AnnotatedHandlerRepositoryEventListener |
setBasePackage(java.lang.String basePackage)
Set the base package in which to search for event handlers.
|
public AnnotatedHandlerRepositoryEventListener()
public AnnotatedHandlerRepositoryEventListener(java.lang.String basePackage)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public java.lang.String getBasePackage()
public AnnotatedHandlerRepositoryEventListener setBasePackage(java.lang.String basePackage)
basePackage
- Base package to search for handlers.public java.lang.String basePackage()
public AnnotatedHandlerRepositoryEventListener basePackage(java.lang.String basePackage)
basePackage
- Base package to search for handlers.public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
public void onApplicationEvent(RepositoryEvent event)
onApplicationEvent
in interface org.springframework.context.ApplicationListener<RepositoryEvent>