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 Object
      implements Extension

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractExtension(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, String message)`
    `int` | `flush()`
    `WebSocket.FrameConnection` | `getConnection()`
    `String` | `getInitParameter(String name)`
    `int` | `getInitParameter(String name, int dft)`
    `String` | `getInitParameter(String name, String dft)`
    `String` | `getName()`
    `String` | `getParameterizedName()`
    `boolean` | `init(Map<String,String> parameters)`
    `boolean` | `isBufferEmpty()`
    `boolean` | `isFlag(byte flags, int rsv)`
    `void` | `onFrame(byte flags, byte opcode, Buffer buffer)`
    `byte` | `setFlag(byte flags, int rsv)`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### AbstractExtension

          public AbstractExtension(String name)

  - ### Method Detail

    - #### getConnection

          public WebSocket.FrameConnection getConnection()

    - #### init

          public boolean init(Map<String,String> parameters)

      Specified by:
        `init` in interface `Extension`

    - #### getInitParameter

          public String getInitParameter(String name)

    - #### getInitParameter

          public String getInitParameter(String name,
                                String dft)

    - #### getInitParameter

          public int getInitParameter(String name,
                             int dft)

    - #### bind

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

      Specified by:
        `bind` in interface `Extension`

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `Extension`

    - #### getParameterizedName

          public 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,
                   String message)

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

    - #### flush

          public int flush()
                    throws IOException

      Specified by:
        `flush` in interface `WebSocketGenerator`
      Throws:
        `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 IOException

      Specified by:
        `addFrame` in interface `WebSocketGenerator`
      Throws:
        `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 String toString()

      Overrides:
        `toString` in class `Object`

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