Interface ExtensionHandshake
-
- All Known Implementing Classes:
PerMessageDeflateHandshake
public interface ExtensionHandshakeBase 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebSocketExtensionaccept(WebSocketExtension extension)Validate if an extension request is accepted.ExtensionFunctioncreate()Create a new instance of theExtensionFunctionassociated to this WebSocket Extension.java.lang.StringgetName()booleanisIncompatible(java.util.List<ExtensionHandshake> extensions)Validate if current extension is compatible with previously negotiated in the server side.
-
-
-
Method Detail
-
getName
java.lang.String getName()
- Returns:
- name of the WebSocket Extension
-
accept
WebSocketExtension accept(WebSocketExtension extension)
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
boolean isIncompatible(java.util.List<ExtensionHandshake> extensions)
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
-
-