public abstract class ServerSentEventConnection extends Object implements Closeable
| Constructor and Description |
|---|
ServerSentEventConnection() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Closes the connection
|
String |
getLastEventID()
Event source's last event ID.
|
abstract javax.servlet.http.HttpServletRequest |
getRequest()
Servlet request for Server-Sent Event connection
|
abstract void |
sendMessage(ServerSentEventData eventData)
Sends the Server-Sent event to client
|
abstract void |
sendMessage(String eventData)
Sends the Server-Sent event to client
|
public abstract javax.servlet.http.HttpServletRequest getRequest()
public String getLastEventID()
public abstract void sendMessage(String eventData) throws IOException
eventData - Server-Sent event dataIOException - when there is an error in sendingIllegalStateException - when called after calling close methodServerSentEventDatapublic abstract void sendMessage(ServerSentEventData eventData) throws IOException
eventData - Server-Sent event dataIOException - when there is an error in sendingIllegalStateException - when called after calling close methodServerSentEventDatapublic abstract void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2017. All rights reserved.