Interface ExtensionHandshake

All Known Implementing Classes:
PerMessageDeflateHandshake

public interface ExtensionHandshake
Base interface for WebSocket Extension handshake.

It is responsible of the definition and negotiation logic of a WebSocket Extension. It interacts at the handshake phase.

It creates new instances of ExtensionFunction .

Author:
Lucas Ponce
  • Method Details

    • getName

      String getName()
      Returns:
      name of the WebSocket Extension
    • accept

      Validate if an extension request is accepted.
      Parameters:
      extension - the extension request representation
      Returns:
      a new WebSocketExtension instance with parameters accepted; null in case extension request is not accepted
    • isIncompatible

      boolean isIncompatible(List<ExtensionHandshake> extensions)
      Validate if current extension is compatible with previously negotiated in the server side.
      Parameters:
      extensions - a list of negotiated extensions
      Returns:
      true if current extension is compatible; false if current extension is not compatible
    • create

      Create a new instance of the ExtensionFunction associated to this WebSocket Extension.
      Returns:
      a new instance ExtensionFunction