Package org.apache.unomi.api.services
Interface EventListenerService
-
- All Known Implementing Classes:
RulesServiceImpl
,UnomiEventPublisher
public interface EventListenerService
A service that gets notified (viaonEvent(Event)
) whenever an event it can handle as decided bycanHandle(Event)
occurs in the context server.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canHandle(Event event)
Whether or not this listener can handle the specified event.int
onEvent(Event event)
Handles the specified event.
-
-
-
Method Detail
-
canHandle
boolean canHandle(Event event)
Whether or not this listener can handle the specified event.- Parameters:
event
- the event to be handled- Returns:
true
if this listener can handle the specified event,false
otherwise
-
onEvent
int onEvent(Event event)
Handles the specified event.- Parameters:
event
- the event to be handled- Returns:
- the result of the event handling as combination of
EventService
flags, to be checked using bitwise AND (&) operator - See Also:
EventService.NO_CHANGE
,EventService.PROFILE_UPDATED
,EventService.SESSION_UPDATED
-
-