org.eclipse.jetty.websocket

## Class AbstractExtension

- java.lang.Object
- - org.eclipse.jetty.websocket.AbstractExtension

- All Implemented Interfaces:
    Extension, WebSocketGenerator, WebSocketParser.FrameHandler
  Direct Known Subclasses:
    DeflateFrameExtension, FragmentExtension, IdentityExtension

      public class AbstractExtension
      extends java.lang.Object
      implements Extension

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractExtension(java.lang.String name)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addFrame(byte flags, byte opcode, byte[] content, int offset, int length)`
    `void` | `bind(WebSocket.FrameConnection connection, WebSocketParser.FrameHandler incoming, WebSocketGenerator outgoing)`
    `byte` | `clearFlag(byte flags, int rsv)`
    `void` | `close(int code, java.lang.String message)`
    `int` | `flush()`
    `WebSocket.FrameConnection` | `getConnection()`
    `java.lang.String` | `getInitParameter(java.lang.String name)`
    `int` | `getInitParameter(java.lang.String name, int dft)`
    `java.lang.String` | `getInitParameter(java.lang.String name, java.lang.String dft)`
    `java.lang.String` | `getName()`
    `java.lang.String` | `getParameterizedName()`
    `boolean` | `init(java.util.Map<java.lang.String,java.lang.String> parameters)`
    `boolean` | `isBufferEmpty()`
    `boolean` | `isFlag(byte flags, int rsv)`
    `void` | `onFrame(byte flags, byte opcode, Buffer buffer)`
    `byte` | `setFlag(byte flags, int rsv)`
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### AbstractExtension

          public AbstractExtension(java.lang.String name)

  - ### Method Detail

    - #### getConnection

          public WebSocket.FrameConnection getConnection()

    - #### init

          public boolean init(java.util.Map<java.lang.String,java.lang.String> parameters)

      Specified by:
        `init` in interface `Extension`

    - #### getInitParameter

          public java.lang.String getInitParameter(java.lang.String name)

    - #### getInitParameter

          public java.lang.String getInitParameter(java.lang.String name,
                                          java.lang.String dft)

    - #### getInitParameter

          public int getInitParameter(java.lang.String name,
                             int dft)

    - #### bind

          public void bind(WebSocket.FrameConnection connection,
                  WebSocketParser.FrameHandler incoming,
                  WebSocketGenerator outgoing)

      Specified by:
        `bind` in interface `Extension`

    - #### getName

          public java.lang.String getName()

      Specified by:
        `getName` in interface `Extension`

    - #### getParameterizedName

          public java.lang.String getParameterizedName()

      Specified by:
        `getParameterizedName` in interface `Extension`

    - #### onFrame

          public void onFrame(byte flags,
                     byte opcode,
                     Buffer buffer)

      Specified by:
        `onFrame` in interface `WebSocketParser.FrameHandler`

    - #### close

          public void close(int code,
                   java.lang.String message)

      Specified by:
        `close` in interface `WebSocketParser.FrameHandler`

    - #### flush

          public int flush()
                    throws java.io.IOException

      Specified by:
        `flush` in interface `WebSocketGenerator`
      Throws:
        `java.io.IOException`

    - #### isBufferEmpty

          public boolean isBufferEmpty()

      Specified by:
        `isBufferEmpty` in interface `WebSocketGenerator`

    - #### addFrame

          public void addFrame(byte flags,
                      byte opcode,
                      byte[] content,
                      int offset,
                      int length)
                        throws java.io.IOException

      Specified by:
        `addFrame` in interface `WebSocketGenerator`
      Throws:
        `java.io.IOException`

    - #### setFlag

          public byte setFlag(byte flags,
                     int rsv)

    - #### clearFlag

          public byte clearFlag(byte flags,
                       int rsv)

    - #### isFlag

          public boolean isFlag(byte flags,
                       int rsv)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2013 FuseSource, Corp.. All Rights Reserved.