CometEventImpl (Apache Tomcat 6.0.53 API Documentation)
Keywords: org.apache.catalina.connector.CometEventImpl class

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 6.0.53
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.connector
Class CometEventImpl

    java.lang.Object
      org.apache.catalina.connector.CometEventImpl

All Implemented Interfaces:
  CometEvent

    public class CometEventImpl

extends java.lang.Object
implements CometEvent

Nested Class Summary

Nested classes/interfaces inherited from interface org.apache.catalina.CometEvent
`CometEvent.EventSubType, CometEvent.EventType`

Field Summary
`protected CometEvent.EventSubType` | `eventSubType` Event sub type.
`protected CometEvent.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 Summary
`CometEventImpl(Request request, Response response)`

Method Summary
`void` | `clear()` Clear the event.
`void` | `close()` Ends the Comet session.
`CometEvent.EventSubType` | `getEventSubType()` Returns the sub type of this event.
`CometEvent.EventType` | `getEventType()` Returns the event type.
`javax.servlet.http.HttpServletRequest` | `getHttpServletRequest()` Returns the HttpServletRequest.
`javax.servlet.http.HttpServletResponse` | `getHttpServletResponse()` Returns the HttpServletResponse.
`void` | `setEventSubType(CometEvent.EventSubType eventSubType)`
`void` | `setEventType(CometEvent.EventType eventType)`
`void` | `setTimeout(int timeout)` Sets the timeout for this Comet connection.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### sm

    protected static StringManager sm

  The string manager for this package.

### request

    protected Request request

  Associated request.

### response

    protected Response response

  Associated response.

### eventType

    protected CometEvent.EventType eventType

  Event type.

### eventSubType

    protected CometEvent.EventSubType eventSubType

  Event sub type.

Constructor Detail

### CometEventImpl

    public CometEventImpl(Request request,
                          Response response)

Method Detail

### clear

    public void clear()

  Clear the event.

### setEventType

    public void setEventType(CometEvent.EventType eventType)

### setEventSubType

    public void setEventSubType(CometEvent.EventSubType eventSubType)

### close

    public void close()
               throws java.io.IOException

  Description copied from interface: `CometEvent`
  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.

  Specified by:
    `close` in interface `CometEvent`
  Throws:
    `java.io.IOException` - if an IO exception occurs

### getEventSubType

    public CometEvent.EventSubType getEventSubType()

  Description copied from interface: `CometEvent`
  Returns the sub type of this event.

  Specified by:
    `getEventSubType` in interface `CometEvent`
  Returns:
    EventSubType

### getEventType

    public CometEvent.EventType getEventType()

  Description copied from interface: `CometEvent`
  Returns the event type.

  Specified by:
    `getEventType` in interface `CometEvent`
  Returns:
    EventType

### getHttpServletRequest

    public javax.servlet.http.HttpServletRequest getHttpServletRequest()

  Description copied from interface: `CometEvent`
  Returns the HttpServletRequest.

  Specified by:
    `getHttpServletRequest` in interface `CometEvent`
  Returns:
    HttpServletRequest

### getHttpServletResponse

    public javax.servlet.http.HttpServletResponse getHttpServletResponse()

  Description copied from interface: `CometEvent`
  Returns the HttpServletResponse.

  Specified by:
    `getHttpServletResponse` in interface `CometEvent`
  Returns:
    HttpServletResponse

### setTimeout

    public void setTimeout(int timeout)
                    throws java.io.IOException,
                           javax.servlet.ServletException,
                           java.lang.UnsupportedOperationException

  Description copied from interface: `CometEvent`
  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.

  Specified by:
    `setTimeout` in interface `CometEvent`
  Parameters:
    `timeout` - The timeout in milliseconds for this connection, must be a positive value, larger than 0
  Throws:
    `java.io.IOException` - An IOException may be thrown to indicate an IO error, or that the EOF has been reached on the connection
    `javax.servlet.ServletException` - An exception has occurred, as specified by the root cause
    `java.lang.UnsupportedOperationException` - if per connection timeout is not supported, either at all or at this phase of the invocation.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 6.0.53
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.