T
- the configurationpublic static class EventListenerRegistration.RegistrationListenerConfiguration<T extends EventListenerRegistration.RegistrationListenerConfiguration<T>>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected IEventMatcher |
eventMatcher
The event matcher of the configuration.
|
protected IEventListener |
listener
The notification listener of the configuration.
|
Modifier | Constructor and Description |
---|---|
protected |
RegistrationListenerConfiguration(IEventListener listener)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
EventListenerRegistration |
create()
Creates new instance of notification listener with the configured listener and event matcher.
|
T |
withAllowedEvents(EventType... types)
Creates and assigns an event matcher that will allow the specified event types.
|
T |
withIgnoredEvents(EventType... types)
Creates and assigns an event matcher that will ignore the specified event types.
|
T |
withMatcher(IEventMatcher eventMatcher)
Assigns the specified event matcher to the configuration.
|
protected IEventListener listener
protected IEventMatcher eventMatcher
protected RegistrationListenerConfiguration(IEventListener listener)
listener
- the listenerpublic T withMatcher(IEventMatcher eventMatcher)
eventMatcher
- the event matcherpublic T withAllowedEvents(EventType... types)
types
- the types to allowpublic T withIgnoredEvents(EventType... types)
types
- the types to ignorepublic EventListenerRegistration create()