Interface IEventManager
See the related IPersistenceEvent
and IPersistenceListener
for more information.
Using the com.polarion.platform.persistence.dataservice.listeners
configuration
point the listeners might register during startup, to make sure not to miss any event.
The contribution looks like this:
<contribution configuration-id="com.polarion.platform.persistence.dataservice.listeners"> <listener service="my-service-implementing-IPersistenceEventListener" contextId="/repository-name/projectId" (optional) prototypes="Comma,Separated,List" (optional) /> </contribution>
- Author:
- dobisekm
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Completely deregister the listener.void
Registers the listener for all events.void
registerListener
(IPersistenceListener l, IContextId context) Registers the listener only for evens on objects from given contex.void
registerListener
(IPersistenceListener l, String[] prototypes) Registers the listener only for evens on objects of given prototypes.void
registerListener
(IPersistenceListener l, String[] prototypes, IContextId context) Registers the listener only for evens on objects of given prototypes from given context.void
registerListener
(IPersistenceListener l, String[] prototypes, IContextId context, boolean singleNode) Registers the listener only for events on objects of given prototypes from given context.
-
Method Details
-
registerListener
Registers the listener for all events.- Parameters:
l
- Notnull
.
-
registerListener
Registers the listener only for evens on objects of given prototypes.- Parameters:
l
- Notnull
.prototypes
- Prototypes, ifnull
, then no filtering will occur.
-
registerListener
Registers the listener only for evens on objects from given contex.Note, that this method does not take into account the context hierarchy, and therefore the events from the child contexts of the given context will not be processed.
- Parameters:
l
- Notnull
.context
- The context, ifnull
, then no filtering will occur.
-
registerListener
Registers the listener only for evens on objects of given prototypes from given context.Note, that this method does not take into account the context hierarchy, and therefore the events from the child contexts of the given context will not be processed.
- Parameters:
l
- Notnull
. If the listener is already registered, then it's deregistered and registered with the new settings.prototypes
- Prototypes, ifnull
, then no filtering will occur.context
- The context, ifnull
, then no filtering will occur.
-
registerListener
void registerListener(IPersistenceListener l, String[] prototypes, IContextId context, boolean singleNode) Registers the listener only for events on objects of given prototypes from given context.Note, that this method does not take into account the context hierarchy, and therefore the events from the child contexts of the given context will not be processed.
- Parameters:
l
- Notnull
. If the listener is already registered, then it's deregistered and registered with the new settings.prototypes
- Prototypes, ifnull
, then no filtering will occur.context
- The context, ifnull
, then no filtering will occur.singleNode
- If the listener should be run on single node in cluster if node is running in cluster WARNING: experimental - may not work for some prototypes- Since:
- 3.8.0
-
deregisterListener
Completely deregister the listener.- Parameters:
l
- Notnull
.
-