public interface HttpEvent
Modifier and Type | Interface and Description |
---|---|
static class |
HttpEvent.EventType
Enumeration describing the major events that the container can invoke
the EventHttpServlet event() method with:
BEGIN - will be called at the beginning
of the processing of the connection.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Ends the request, which marks the end of the event stream.
|
HttpServletRequest |
getHttpServletRequest()
Returns the HttpServletRequest.
|
HttpServletResponse |
getHttpServletResponse()
Returns the HttpServletResponse.
|
HttpEvent.EventType |
getType()
Returns the event type.
|
boolean |
isReadReady()
Returns true when data may be read from the connection (the flag becomes false if no data
is available to read).
|
boolean |
isWriteReady()
Returns true when data may be written to the connection (the flag becomes false
when the client is unable to accept data fast enough).
|
void |
resume()
Resume will cause the Servlet container to send a generic event
to the Servlet, where the request can be processed synchronously
(for example, it is possible to use this to complete the request after
some asynchronous processing is done).
|
void |
setTimeout(int timeout)
This method sets the timeout in milliseconds of idle time on the connection.
|
void |
suspend()
Suspend processing of the connection until the configured timeout occurs,
or resume() is called.
|
HttpServletRequest getHttpServletRequest()
HttpServletResponse getHttpServletResponse()
HttpEvent.EventType getType()
#EventType
void close() throws java.io.IOException
java.io.IOException
- if an IO exception occursvoid setTimeout(int timeout)
timeout
- The timeout in milliseconds for this connection, must be a positive value, larger than 0boolean isReadReady()
boolean isWriteReady()
void suspend()
void resume()