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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Http session listener. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
dispatchEvent
(String name, String data) Writes a message toHttpServletResponse
final String
getId()
abstract javax.servlet.http.HttpServletResponse
Map<org.jenkinsci.plugins.pubsub.EventFilter,
org.jenkinsci.plugins.pubsub.ChannelSubscriber> protected User
getUser()
void
abstract void
start
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) void
stop()
boolean
subscribe
(org.jenkinsci.plugins.pubsub.EventFilter filter) toString()
boolean
unsubscribe
(org.jenkinsci.plugins.pubsub.EventFilter filter) void
-
Field Details
-
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
-
setId
-
toString
-
dispatchEvent
public boolean dispatchEvent(String name, String data) throws IOException, javax.servlet.ServletException Writes a message toHttpServletResponse
- Parameters:
name
- event-namedata
- event-data- Returns:
- false if the response is not writable
- Throws:
IOException
- io-exceptionjavax.servlet.ServletException
- servlet-exception
-
stop
public void stop() -
subscribe
public boolean subscribe(@NonNull org.jenkinsci.plugins.pubsub.EventFilter filter) -
getUser
-
unsubscribe
public boolean unsubscribe(@NonNull org.jenkinsci.plugins.pubsub.EventFilter filter) -
unsubscribeAll
public void unsubscribeAll()
-