public class CoreEventListenerServiceImpl extends DefaultComponent implements CoreEventListenerService
Service dedicated to the processing of repository events. This service exists for evident performance reasons.
Modifier and Type | Field and Description |
---|---|
static ComponentName |
NAME |
Constructor and Description |
---|
CoreEventListenerServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(EventListener listener)
Adds a repository event listener.
|
void |
fireOperationStarted(Operation<?> command)
Fires a command starting event.
|
void |
fireOperationTerminated(Operation<?> command)
Fires a command termination event.
|
EventListener |
getEventListenerByName(String name)
Returns an event listener given its name.
|
Collection<EventListener> |
getEventListeners()
Returns the collection of event listeners.
|
void |
notifyEventListeners(CoreEvent coreEvent)
Notifies a core event.
|
void |
registerExtension(Extension extension)
Registers the given extension.
|
void |
removeEventListener(EventListener listener)
Removes a repository event listener.
|
void |
transactionAboutToCommit() |
void |
transactionCommited()
Notify post commit listeners about all events raised in the current transaction.
|
void |
transactionRollbacked()
Called by the core session after the current transaction was rollbacked.
|
void |
transactionStarted()
A new transaction started.
|
void |
unregisterExtension(Extension extension)
Unregisters the given extension.
|
activate, applicationStarted, deactivate, getAdapter, registerContribution, unregisterContribution
public static final ComponentName NAME
public void addEventListener(EventListener listener)
CoreEventListenerService
addEventListener
in interface CoreEventListenerService
listener
- the event listener to addpublic void notifyEventListeners(CoreEvent coreEvent)
CoreEventListenerService
Event listeners are notified if they are configured to process the given event type. They are notified in the order defined in their settings.
notifyEventListeners
in interface CoreEventListenerService
coreEvent
- a coreEvent instancepublic void removeEventListener(EventListener listener)
CoreEventListenerService
removeEventListener
in interface CoreEventListenerService
listener
- the event listener to removepublic void registerExtension(Extension extension) throws Exception
Extensible
registerExtension
in interface Extensible
registerExtension
in class DefaultComponent
extension
- the extension to registerException
- if any error occurspublic void unregisterExtension(Extension extension) throws Exception
Extensible
unregisterExtension
in interface Extensible
unregisterExtension
in class DefaultComponent
extension
- the extension to unregisterException
- if any error occurspublic EventListener getEventListenerByName(String name)
CoreEventListenerService
getEventListenerByName
in interface CoreEventListenerService
name
- the name of the event listener used a registration timepublic Collection<EventListener> getEventListeners()
CoreEventListenerService
getEventListeners
in interface CoreEventListenerService
public void fireOperationStarted(Operation<?> command)
CoreEventListenerService
fireOperationStarted
in interface CoreEventListenerService
command
- the commandpublic void fireOperationTerminated(Operation<?> command)
CoreEventListenerService
fireOperationTerminated
in interface CoreEventListenerService
command
- the command that terminatedpublic void transactionCommited()
CoreEventListenerService
transactionCommited
in interface CoreEventListenerService
public void transactionRollbacked()
CoreEventListenerService
transactionRollbacked
in interface CoreEventListenerService
public void transactionStarted()
CoreEventListenerService
transactionStarted
in interface CoreEventListenerService
public void transactionAboutToCommit()
Copyright © 2011 Nuxeo SA. All Rights Reserved.