Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.listener
Interface CoreEventListenerService

All Known Implementing Classes:
CoreEventListenerServiceImpl, DefaultEventService

public interface CoreEventListenerService

Repository listener.

Author:
Julien Anguenot, Bogdan Stefanescu
See Also:
EventListener, CoreEvent

Method Summary
 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 removeEventListener(EventListener listener)
          Removes a repository event listener.
 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.
 

Method Detail

addEventListener

void addEventListener(EventListener listener)
Adds a repository event listener.

Parameters:
listener - the event listener to add

removeEventListener

void removeEventListener(EventListener listener)
Removes a repository event listener.

Parameters:
listener - the event listener to remove

notifyEventListeners

void notifyEventListeners(CoreEvent coreEvent)
Notifies a core event.

Event listeners are notified if they are configured to process the given event type. They are notified in the order defined in their settings.

Parameters:
coreEvent - a coreEvent instance

fireOperationStarted

void fireOperationStarted(Operation<?> command)
Fires a command starting event.

Parameters:
command - the command

fireOperationTerminated

void fireOperationTerminated(Operation<?> command)
Fires a command termination event.

Parameters:
command - the command that terminated

getEventListeners

Collection<EventListener> getEventListeners()
Returns the collection of event listeners.

Returns:
the collection of event listeners

getEventListenerByName

EventListener getEventListenerByName(String name)
Returns an event listener given its name.

Parameters:
name - the name of the event listener used a registration time
Returns:
the EventListener instance, or null if none found.

transactionCommited

void transactionCommited()
Notify post commit listeners about all events raised in the current transaction. Called by the core session after the current transaction was committed


transactionRollbacked

void transactionRollbacked()
Called by the core session after the current transaction was rollbacked. Post commit events will be removed


transactionStarted

void transactionStarted()
A new transaction started. This will start a new post commit session


Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.