Class EventDispatcherFactory

java.lang.Object
org.jenkinsci.plugins.ssegateway.sse.EventDispatcherFactory

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class EventDispatcherFactory extends Object
Author:
tom.fennelly@gmail.com
  • Field Details

    • DISPATCHER_SESSION_KEY

      public static final String DISPATCHER_SESSION_KEY
  • Constructor Details

    • EventDispatcherFactory

      public EventDispatcherFactory()
  • Method Details

    • start

      public static EventDispatcher start(@NonNull String clientId, @NonNull javax.servlet.http.HttpServletRequest request, @NonNull javax.servlet.http.HttpServletResponse response)
    • getDispatchers

      public static Map<String,EventDispatcher> getDispatchers(@NonNull javax.servlet.http.HttpSession session)
      Get the session EventDispatchers from the HttpSession.
      Parameters:
      session - The HttpSession.
      Returns:
      The session EventDispatchers.
    • newDispatcher

      public static EventDispatcher newDispatcher(@NonNull String clientId, @NonNull javax.servlet.http.HttpSession session)
      Create a new EventDispatcher instance and attach it to the user session.
      Parameters:
      clientId - The dispatcher client Id.
      session - The HttpSession.
      Returns:
      The new EventDispatcher instance.
    • getDispatcher

      @CheckForNull public static EventDispatcher getDispatcher(@NonNull String dispatcherId, @NonNull javax.servlet.http.HttpSession session)
      Get the specified EventDispatcher instance from the HttpSession.
      Parameters:
      dispatcherId - The dispatcher ID.
      session - The HttpSession.
      Returns:
      The EventDispatcher, or null if no such dispatcher is known.