Class EventListenerDescriptor

java.lang.Object
org.nuxeo.ecm.core.event.impl.EventListenerDescriptor

public class EventListenerDescriptor extends Object
XObject descriptor to declare event listeners
  • Field Details

    • name

      protected String name
    • className

      protected String className
      The event listener class.
    • script

      protected String script
      A script reference: URL, file path, or bundle entry. Runtime variable are expanded. To specify a bundle entry use the URL schema "bundle:"
    • isPostCommit

      protected boolean isPostCommit
      Applies only for scripts.
    • isAsync

      protected Boolean isAsync
      Applies only for post commit listener
    • transactionTimeOut

      protected Integer transactionTimeOut
    • priority

      protected Integer priority
      The priority to be used to order listeners.
    • isEnabled

      protected boolean isEnabled
    • retryCount

      protected Integer retryCount
    • singleThreaded

      protected boolean singleThreaded
    • events

      protected Set<String> events
    • rc

      protected RuntimeContext rc
    • inLineListener

      protected EventListener inLineListener
    • postCommitEventListener

      protected PostCommitEventListener postCommitEventListener
  • Constructor Details

    • EventListenerDescriptor

      public EventListenerDescriptor()
  • Method Details

    • getPriority

      public int getPriority()
    • setRuntimeContext

      public void setRuntimeContext(RuntimeContext rc)
    • getRuntimeContext

      public RuntimeContext getRuntimeContext()
    • isEnabled

      public boolean isEnabled()
    • getRetryCount

      public Integer getRetryCount()
    • getEvents

      public Set<String> getEvents()
    • setEvents

      public void setEvents(Set<String> events)
    • setEnabled

      public void setEnabled(boolean isEnabled)
    • setRetryCount

      public void setRetryCount(Integer retryCount)
    • initListener

      public void initListener()
    • asEventListener

      public EventListener asEventListener()
    • asPostCommitListener

      public PostCommitEventListener asPostCommitListener()
    • getScript

      public Script getScript() throws IOException
      Throws:
      IOException
    • getName

      public String getName()
    • getTransactionTimeout

      public Integer getTransactionTimeout()
    • merge

      public void merge(EventListenerDescriptor other)
    • acceptEvent

      public final boolean acceptEvent(String eventName)
    • setIsAsync

      public void setIsAsync(Boolean isAsync)
    • getIsAsync

      public boolean getIsAsync()
    • isSingleThreaded

      public boolean isSingleThreaded()
    • filterBundle

      public EventBundle filterBundle(EventBundle bundle)
      Filters the event bundle to only keep events of interest to this listener.
      Since:
      5.7
    • acceptBundle

      public boolean acceptBundle(EventBundle bundle)
      Checks if there's at least one event of interest in the bundle.
      Since:
      5.7
    • toString

      public String toString()
      Overrides:
      toString in class Object