public abstract class ServerSentEventHandler extends Object
ServerSentEvent| Modifier and Type | Class and Description |
|---|---|
static class |
ServerSentEventHandler.Status |
| Modifier and Type | Field and Description |
|---|---|
protected ServerSentEventConnection |
connection |
| Constructor and Description |
|---|
ServerSentEventHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
onClosed()
Callback to indicate that the client closed the connection
|
void |
onConnected(ServerSentEventConnection connection)
A callback to indicate that a client connects to receive Server-Sent Events.
|
ServerSentEventHandler.Status |
onConnecting(javax.servlet.http.HttpServletRequest request)
A callback to indicate that a client connects to receive Server-Sent Events.
|
protected ServerSentEventConnection connection
public ServerSentEventHandler.Status onConnecting(javax.servlet.http.HttpServletRequest request)
Last-Event-ID may be used in determining the status and it can be
got using HttpServletRequest.getHeader("Last-Event-ID")
request - connection requestpublic void onConnected(ServerSentEventConnection connection)
connection - Server-Sert event connectionpublic void onClosed()
Copyright © 2019. All rights reserved.