| org.apache.catalina.CometEvent
All known Subclasses: org.apache.catalina.connector.CometEventImpl,
CometEvent | public interface CometEvent (Code) | | The CometEvent interface.
author: Filip Hanik author: Remy Maucherat |
Inner Class :public enum EventType | |
Inner Class :public enum EventSubType | |
close | public void close() throws IOException(Code) | | Ends the Comet session. This signals to the container that
the container wants to end the comet session. This will send back to the
client a notice that the server has no more data to send as part of this
request. The servlet should perform any needed cleanup as if it had recieved
an END or ERROR event.
throws: IOException - if an IO exception occurs |
getEventSubType | public EventSubType getEventSubType()(Code) | | Returns the sub type of this event.
EventSubType |
getEventType | public EventType getEventType()(Code) | | Returns the event type.
EventType |
getHttpServletRequest | public HttpServletRequest getHttpServletRequest()(Code) | | Returns the HttpServletRequest.
HttpServletRequest |
getHttpServletResponse | public HttpServletResponse getHttpServletResponse()(Code) | | Returns the HttpServletResponse.
HttpServletResponse |
setTimeout | public void setTimeout(int timeout) throws IOException, ServletException, UnsupportedOperationException(Code) | | Sets the timeout for this Comet connection. Please NOTE, that the implementation
of a per connection timeout is OPTIONAL and MAY NOT be implemented.
This method sets the timeout in milliseconds of idle time on the connection.
The timeout is reset every time data is received from the connection or data is flushed
using response.flushBuffer() . If a timeout occurs, the
error(HttpServletRequest, HttpServletResponse) method is invoked. The
web application SHOULD NOT attempt to reuse the request and response objects after a timeout
as the error(HttpServletRequest, HttpServletResponse) method indicates.
This method should not be called asynchronously, as that will have no effect.
Parameters: timeout - The timeout in milliseconds for this connection, must be a positive value, larger than 0 throws: IOException - An IOException may be thrown to indicate an IO error, or that the EOF has been reached on the connection throws: ServletException - An exception has occurred, as specified by the rootcause throws: UnsupportedOperationException - if per connection timeout is not supported, either at all or at this phaseof the invocation. |
|
|