org.eclipse.jetty.websocket

## Class WebSocketConnectionD06

- java.lang.Object
- - org.eclipse.jetty.io.AbstractConnection
  - - org.eclipse.jetty.websocket.WebSocketConnectionD06

- All Implemented Interfaces:
    Connection, AsyncConnection, WebSocketConnection
  Direct Known Subclasses:
    WebSocketServletConnectionD06

      public class WebSocketConnectionD06
      extends AbstractConnection
      implements WebSocketConnection

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.jetty.io.AbstractConnection

      `_endp`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebSocketConnectionD06(WebSocket websocket, EndPoint endpoint, WebSocketBuffers buffers, long timestamp, int maxIdleTime, String protocol)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `closeIn(int code, String message)`
    `void` | `closeOut(int code, String message)`
    `void` | `fillBuffersFrom(Buffer buffer)`
    `WebSocket.Connection` | `getConnection()`
    `List<Extension>` | `getExtensions()`
    `Connection` | `handle()` Handle the connection.
    `static String` | `hashKey(String key)`
    `boolean` | `isIdle()`
    `boolean` | `isSuspended()` The semantic of this method is to return true to indicate interest in further reads, or false otherwise, but it is misnamed and should be really called `isReadInterested()`.
    `void` | `onClose()` Called after the connection is closed
    `protected void` | `onFrameHandshake()`
    `void` | `onIdleExpired(long idleForMs)` Called when the connection idle timeout expires
    `void` | `onInputShutdown()`
    `protected void` | `onWebSocketOpen()`
    `void` | `shutdown()`

    - ### Methods inherited from class org.eclipse.jetty.io.AbstractConnection

      `getEndPoint, getTimeStamp, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.jetty.io.Connection

      `getTimeStamp`

- - ### Constructor Detail

    - #### WebSocketConnectionD06

          public WebSocketConnectionD06(WebSocket websocket,
                                EndPoint endpoint,
                                WebSocketBuffers buffers,
                                long timestamp,
                                int maxIdleTime,
                                String protocol)
                                 throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### getConnection

          public WebSocket.Connection getConnection()

      Specified by:
        `getConnection` in interface `WebSocketConnection`

    - #### handle

          public Connection handle()
                            throws IOException

      Description copied from interface: `Connection`
      Handle the connection.
      Specified by:
        `handle` in interface `Connection`
      Returns:
        The Connection to use for the next handling of the connection. This allows protocol upgrades and support for CONNECT.
      Throws:
        `IOException` - if the handling of I/O operations fail

    - #### onInputShutdown

          public void onInputShutdown()
                               throws IOException

      Specified by:
        `onInputShutdown` in interface `AsyncConnection`
      Throws:
        `IOException`

    - #### isIdle

          public boolean isIdle()

      Specified by:
        `isIdle` in interface `Connection`
      Returns:
        whether this connection is idle, that is not parsing and not generating
      See Also:
        `Connection.onIdleExpired(long)`

    - #### onIdleExpired

          public void onIdleExpired(long idleForMs)

      Description copied from interface: `Connection`
      Called when the connection idle timeout expires
      Specified by:
        `onIdleExpired` in interface `Connection`
      Overrides:
        `onIdleExpired` in class `AbstractConnection`
      Parameters:
        `idleForMs` - how long the connection has been idle
      See Also:
        `Connection.isIdle()`

    - #### isSuspended

          public boolean isSuspended()

      Description copied from interface: `Connection`

      The semantic of this method is to return true to indicate interest in further reads, or false otherwise, but it is misnamed and should be really called `isReadInterested()`.

      Specified by:
        `isSuspended` in interface `Connection`
      Returns:
        true to indicate interest in further reads, false otherwise

    - #### onClose

          public void onClose()

      Description copied from interface: `Connection`
      Called after the connection is closed
      Specified by:
        `onClose` in interface `Connection`

    - #### closeIn

          public void closeIn(int code,
                     String message)

    - #### closeOut

          public void closeOut(int code,
                      String message)

    - #### shutdown

          public void shutdown()

      Specified by:
        `shutdown` in interface `WebSocketConnection`

    - #### fillBuffersFrom

          public void fillBuffersFrom(Buffer buffer)

      Specified by:
        `fillBuffersFrom` in interface `WebSocketConnection`

    - #### getExtensions

          public List<Extension> getExtensions()

      Specified by:
        `getExtensions` in interface `WebSocketConnection`

    - #### onFrameHandshake

          protected void onFrameHandshake()

    - #### onWebSocketOpen

          protected void onWebSocketOpen()

    - #### hashKey

          public static String hashKey(String key)

Copyright © 1995-2016 Mort Bay Consulting. All Rights Reserved.