public class HttpEventImpl extends Object implements HttpEvent, javax.servlet.http.WebConnection
HttpEvent.EventType| Modifier and Type | Field and Description |
|---|---|
protected HttpEvent.EventType |
eventType
Event type.
|
protected Request |
request
Associated request.
|
protected Response |
response
Associated response.
|
| 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.
|
javax.servlet.http.HttpServletRequest |
getHttpServletRequest()
Returns the HttpServletRequest.
|
javax.servlet.http.HttpServletResponse |
getHttpServletResponse()
Returns the HttpServletResponse.
|
javax.servlet.ServletInputStream |
getInputStream() |
javax.servlet.ServletOutputStream |
getOutputStream() |
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.
|
String |
toString() |
protected Request request
protected Response response
protected HttpEvent.EventType eventType
public void clear()
public void setType(HttpEvent.EventType eventType)
public void close()
throws IOException
HttpEventclose in interface AutoCloseableclose in interface HttpEventIOException - if an IO exception occurspublic HttpEvent.EventType getType()
HttpEventpublic javax.servlet.http.HttpServletRequest getHttpServletRequest()
HttpEventgetHttpServletRequest in interface HttpEventpublic javax.servlet.http.HttpServletResponse getHttpServletResponse()
HttpEventgetHttpServletResponse in interface HttpEventpublic javax.servlet.ServletInputStream getInputStream()
throws IOException
getInputStream in interface javax.servlet.http.WebConnectionIOExceptionpublic javax.servlet.ServletOutputStream getOutputStream()
throws IOException
getOutputStream in interface javax.servlet.http.WebConnectionIOExceptionpublic void setTimeout(int timeout)
HttpEventsetTimeout in interface HttpEventtimeout - The timeout in milliseconds for this connection, must be a positive value, larger than 0public boolean isReadReady()
HttpEventisReadReady in interface HttpEventpublic boolean isWriteReady()
HttpEventisWriteReady in interface HttpEventpublic void resume()
HttpEventpublic void suspend()
HttpEventCopyright © 2016 JBoss by Red Hat. All rights reserved.