Class EventDispatcher

java.lang.Object
org.jenkinsci.plugins.ssegateway.sse.EventDispatcher
All Implemented Interfaces:
Serializable

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public abstract class EventDispatcher extends Object implements Serializable
Author:
tom.fennelly@gmail.com
See Also:
  • Field Details

    • SESSION_SYNC_OBJ

      public static final String SESSION_SYNC_OBJ
      See Also:
    • 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 Details

    • EventDispatcher

      public EventDispatcher()
  • Method Details

    • 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)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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()