Class UnomiEventPublisher
- java.lang.Object
-
- org.apache.unomi.graphql.fetchers.event.UnomiEventPublisher
-
- All Implemented Interfaces:
EventListenerService
public class UnomiEventPublisher extends Object implements EventListenerService
-
-
Constructor Summary
Constructors Constructor Description UnomiEventPublisher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate(org.osgi.framework.BundleContext bundleContext)
boolean
addListener(org.apache.unomi.graphql.fetchers.event.UnomiEventPublisher.EventPublisherListener listener)
boolean
canHandle(Event event)
Whether or not this listener can handle the specified event.org.reactivestreams.Publisher<CDPEventInterface>
createPublisher()
org.reactivestreams.Publisher<CDPEventInterface>
createPublisher(Condition filterCondition)
void
deactivate()
int
onEvent(Event event)
Handles the specified event.boolean
removeListener(org.apache.unomi.graphql.fetchers.event.UnomiEventPublisher.EventPublisherListener listener)
void
setEventInterfaceRegister(CDPEventInterfaceRegister eventRegister)
void
setPersistenceService(PersistenceService persistenceService)
-
-
-
Method Detail
-
activate
public void activate(org.osgi.framework.BundleContext bundleContext)
-
deactivate
public void deactivate()
-
setPersistenceService
public void setPersistenceService(PersistenceService persistenceService)
-
setEventInterfaceRegister
public void setEventInterfaceRegister(CDPEventInterfaceRegister eventRegister)
-
createPublisher
public org.reactivestreams.Publisher<CDPEventInterface> createPublisher()
-
createPublisher
public org.reactivestreams.Publisher<CDPEventInterface> createPublisher(Condition filterCondition)
-
canHandle
public boolean canHandle(Event event)
Description copied from interface:EventListenerService
Whether or not this listener can handle the specified event.- Specified by:
canHandle
in interfaceEventListenerService
- Parameters:
event
- the event to be handled- Returns:
true
if this listener can handle the specified event,false
otherwise
-
onEvent
public int onEvent(Event event)
Description copied from interface:EventListenerService
Handles the specified event.- Specified by:
onEvent
in interfaceEventListenerService
- 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
-
addListener
public boolean addListener(org.apache.unomi.graphql.fetchers.event.UnomiEventPublisher.EventPublisherListener listener)
-
removeListener
public boolean removeListener(org.apache.unomi.graphql.fetchers.event.UnomiEventPublisher.EventPublisherListener listener)
-
-