public abstract class AbstractEventListener extends Object implements EventListener
Constructor and Description |
---|
AbstractEventListener() |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(String eventId)
Returns true if listener processes given event id.
|
void |
addEventId(String eventId)
Adds an event id for this listener to process.
|
String |
getName()
Returns the name of the event listener.
|
Integer |
getOrder()
Returns the int order of the event listener.
|
void |
handleEvent(CoreEvent coreEvent)
Deprecated.
|
void |
notifyEvent(CoreEvent coreEvent)
Deprecated.
use handleEvent instead - notifyEvent is a bad name
This method is preserved for compatibility - remove it when all event listeners will be refactored
|
void |
operationStarted(Operation<?> cmd) |
void |
operationTerminated(Operation<?> cmd) |
void |
removeEventId(String eventId)
Removes an event id for this listener to process.
|
void |
setName(String name)
Sets the name of the event listener.
|
void |
setOrder(Integer order)
Sets the int order of the event listener.
|
public String getName()
EventListener
getName
in interface EventListener
public void setName(String name)
EventListener
setName
in interface EventListener
name
- of the event listenerpublic Integer getOrder()
EventListener
getOrder
in interface EventListener
public void setOrder(Integer order)
EventListener
setOrder
in interface EventListener
order
- the Integer order of the event listener.public void addEventId(String eventId)
EventListener
addEventId
in interface EventListener
public void removeEventId(String eventId)
EventListener
removeEventId
in interface EventListener
public boolean accepts(String eventId)
EventListener
If no event ids are set for this listener, returns true.
accepts
in interface EventListener
public void operationStarted(Operation<?> cmd) throws Exception
operationStarted
in interface EventListener
Exception
public void operationTerminated(Operation<?> cmd) throws Exception
operationTerminated
in interface EventListener
Exception
@Deprecated public void notifyEvent(CoreEvent coreEvent) throws Exception
coreEvent
- the core event to notifyException
@Deprecated public void handleEvent(CoreEvent coreEvent) throws Exception
handleEvent
in interface EventListener
Exception
Copyright © 2011 Nuxeo SA. All Rights Reserved.