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 Summary
Modifier and TypeMethodDescriptionaccept(WebSocketExtension extension) Validate if an extension request is accepted.create()Create a new instance of theExtensionFunctionassociated to this WebSocket Extension.getName()booleanisIncompatible(List<ExtensionHandshake> extensions) Validate if current extension is compatible with previously negotiated in the server side.
-
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
WebSocketExtensioninstance with parameters accepted;nullin case extension request is not accepted
-
isIncompatible
Validate if current extension is compatible with previously negotiated in the server side.- Parameters:
extensions- a list of negotiated extensions- Returns:
trueif current extension is compatible;falseif current extension is not compatible
-
create
ExtensionFunction create()Create a new instance of theExtensionFunctionassociated to this WebSocket Extension.- Returns:
- a new instance
ExtensionFunction
-