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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EventDispatchergetDispatcher(String dispatcherId, jakarta.servlet.http.HttpSession session) Get the specifiedEventDispatcherinstance from theHttpSession.static Map<String, EventDispatcher> getDispatchers(jakarta.servlet.http.HttpSession session) Get the sessionEventDispatchers from theHttpSession.static EventDispatchernewDispatcher(String clientId, jakarta.servlet.http.HttpSession session) Create a newEventDispatcherinstance and attach it to the user session.static EventDispatcherstart(String clientId, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
-
Field Details
-
DISPATCHER_SESSION_KEY
-
-
Constructor Details
-
EventDispatcherFactory
public EventDispatcherFactory()
-
-
Method Details
-
start
public static EventDispatcher start(@NonNull String clientId, @NonNull jakarta.servlet.http.HttpServletRequest request, @NonNull jakarta.servlet.http.HttpServletResponse response) -
getDispatchers
public static Map<String,EventDispatcher> getDispatchers(@NonNull jakarta.servlet.http.HttpSession session) Get the sessionEventDispatchers from theHttpSession.- Parameters:
session- TheHttpSession.- Returns:
- The session
EventDispatchers.
-
newDispatcher
public static EventDispatcher newDispatcher(@NonNull String clientId, @NonNull jakarta.servlet.http.HttpSession session) Create a newEventDispatcherinstance and attach it to the user session.- Parameters:
clientId- The dispatcher client Id.session- TheHttpSession.- Returns:
- The new
EventDispatcherinstance.
-
getDispatcher
@CheckForNull public static EventDispatcher getDispatcher(@NonNull String dispatcherId, @NonNull jakarta.servlet.http.HttpSession session) Get the specifiedEventDispatcherinstance from theHttpSession.- Parameters:
dispatcherId- The dispatcher ID.session- TheHttpSession.- Returns:
- The
EventDispatcher, ornullif no such dispatcher is known.
-