Class EventListenerDescriptor


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

      • log

        public static final Log log
      • 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
    • Constructor Detail

      • EventListenerDescriptor

        public EventListenerDescriptor()
    • Method Detail

      • getPriority

        public int getPriority()
      • setRuntimeContext

        public void setRuntimeContext​(RuntimeContext rc)
      • isEnabled

        public boolean isEnabled()
      • getRetryCount

        public Integer getRetryCount()
      • setEvents

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

        public void setEnabled​(boolean isEnabled)
      • setRetryCount

        public void setRetryCount​(Integer retryCount)
      • initListener

        public void initListener()
      • getName

        public String getName()
      • getTransactionTimeout

        public Integer getTransactionTimeout()
      • 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