HttpEvent.EventType
Modifier and Type | Field and Description |
---|---|
protected HttpEvent.EventType |
eventType
Event type.
|
protected Request |
request
Associated request.
|
protected Response |
response
Associated response.
|
protected static StringManager |
sm
The string manager for this package.
|
Constructor and Description |
---|
HttpEventImpl(Request request,
Response response) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the event.
|
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 |
setType(HttpEvent.EventType eventType) |
void |
suspend()
Suspend processing of the connection until the configured timeout occurs,
or resume() is called.
|
java.lang.String |
toString() |
protected static StringManager sm
protected Request request
protected Response response
protected HttpEvent.EventType eventType
public void clear()
public void setType(HttpEvent.EventType eventType)
public void close() throws java.io.IOException
HttpEvent
public HttpEvent.EventType getType()
HttpEvent
public HttpServletRequest getHttpServletRequest()
HttpEvent
getHttpServletRequest
in interface HttpEvent
public HttpServletResponse getHttpServletResponse()
HttpEvent
getHttpServletResponse
in interface HttpEvent
public void setTimeout(int timeout)
HttpEvent
setTimeout
in interface HttpEvent
timeout
- The timeout in milliseconds for this connection, must be a positive value, larger than 0public boolean isReadReady()
HttpEvent
isReadReady
in interface HttpEvent
public boolean isWriteReady()
HttpEvent
isWriteReady
in interface HttpEvent
public void resume()
HttpEvent
public void suspend()
HttpEvent
public java.lang.String toString()
toString
in class java.lang.Object