Class EventDispatcher

    • Field Detail

      • RETRY_QUEUE_EVENT_LIFETIME

        public static long RETRY_QUEUE_EVENT_LIFETIME
      • RETRY_QUEUE_PROCESSING_DELAY

        public static long RETRY_QUEUE_PROCESSING_DELAY
      • TIMEOUT_DISPATCHERFAIL

        public static long TIMEOUT_DISPATCHERFAIL
    • Constructor Detail

      • EventDispatcher

        public EventDispatcher()
    • Method Detail

      • start

        public abstract void start​(javax.servlet.http.HttpServletRequest request,
                                   javax.servlet.http.HttpServletResponse response)
                            throws IOException,
                                   javax.servlet.ServletException
        Throws:
        IOException
        javax.servlet.ServletException
      • getResponse

        public abstract javax.servlet.http.HttpServletResponse getResponse()
      • getSubscribers

        public Map<org.jenkinsci.plugins.pubsub.EventFilter,​org.jenkinsci.plugins.pubsub.ChannelSubscriber> getSubscribers()
      • getId

        public final String getId()
      • setId

        public void setId​(String id)
      • dispatchEvent

        public boolean dispatchEvent​(String name,
                                     String data)
                              throws IOException,
                                     javax.servlet.ServletException
        Writes a message to HttpServletResponse
        Parameters:
        name - event-name
        data - event-data
        Returns:
        false if the response is not writable
        Throws:
        IOException - io-exception
        javax.servlet.ServletException - servlet-exception
      • stop

        public void stop()
      • subscribe

        public boolean subscribe​(@NonNull
                                 org.jenkinsci.plugins.pubsub.EventFilter filter)
      • getUser

        protected User getUser()
      • unsubscribe

        public boolean unsubscribe​(@NonNull
                                   org.jenkinsci.plugins.pubsub.EventFilter filter)
      • unsubscribeAll

        public void unsubscribeAll()