public class EventListenerDescriptor extends Object
Modifier and Type | Field and Description |
---|---|
protected Class<?> |
clazz
The event listener class.
|
protected Set<String> |
events |
protected EventListener |
inLineListener |
protected Boolean |
isAsync
Applies only for post commit listener
|
protected boolean |
isEnabled |
protected boolean |
isPostCommit
Applies only for scripts.
|
static org.apache.commons.logging.Log |
log |
protected String |
name |
protected PostCommitEventListener |
postCommitEventListener |
protected Integer |
priority
The priority to be used to order listeners.
|
protected RuntimeContext |
rc |
protected Integer |
retryCount |
protected String |
script
A script reference: URL, file path, or bundle entry.
|
protected boolean |
singleThreaded |
protected Integer |
transactionTimeOut |
Constructor and Description |
---|
EventListenerDescriptor() |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptBundle(EventBundle bundle)
Checks if there's at least one event of interest in the bundle.
|
boolean |
acceptEvent(String eventName) |
EventListener |
asEventListener() |
PostCommitEventListener |
asPostCommitListener() |
EventBundle |
filterBundle(EventBundle bundle)
Filters the event bundle to only keep events of interest to this listener.
|
Set<String> |
getEvents() |
boolean |
getIsAsync() |
String |
getName() |
int |
getPriority() |
Integer |
getRetryCount() |
RuntimeContext |
getRuntimeContext() |
Script |
getScript() |
Integer |
getTransactionTimeout() |
void |
initListener() |
boolean |
isEnabled() |
boolean |
isSingleThreaded() |
void |
merge(EventListenerDescriptor other) |
void |
setEnabled(boolean isEnabled) |
void |
setEvents(Set<String> events) |
void |
setIsAsync(Boolean isAsync) |
void |
setRetryCount(Integer retryCount) |
void |
setRuntimeContext(RuntimeContext rc) |
public static final org.apache.commons.logging.Log log
protected String script
protected boolean isPostCommit
protected Integer transactionTimeOut
protected boolean isEnabled
protected Integer retryCount
protected boolean singleThreaded
protected RuntimeContext rc
protected EventListener inLineListener
protected PostCommitEventListener postCommitEventListener
public EventListenerDescriptor()
public int getPriority()
public void setRuntimeContext(RuntimeContext rc)
public RuntimeContext getRuntimeContext()
public boolean isEnabled()
public Integer getRetryCount()
public void setEnabled(boolean isEnabled)
public void setRetryCount(Integer retryCount)
public void initListener()
public EventListener asEventListener()
public PostCommitEventListener asPostCommitListener()
public Script getScript() throws IOException
IOException
public Integer getTransactionTimeout()
public void merge(EventListenerDescriptor other)
public final boolean acceptEvent(String eventName)
public void setIsAsync(Boolean isAsync)
public boolean getIsAsync()
public boolean isSingleThreaded()
public EventBundle filterBundle(EventBundle bundle)
public boolean acceptBundle(EventBundle bundle)
Copyright © 2016 Nuxeo SA. All rights reserved.