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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebSocketExtension
accept(WebSocketExtension extension)
Validate if an extension request is accepted.ExtensionFunction
create()
Create a new instance of theExtensionFunction
associated to this WebSocket Extension.String
getName()
boolean
isIncompatible(List<ExtensionHandshake> extensions)
Validate if current extension is compatible with previously negotiated in the server side.
-
-
-
Method Detail
-
getName
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
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
ExtensionFunction create()
Create a new instance of theExtensionFunction
associated to this WebSocket Extension.- Returns:
- a new instance
ExtensionFunction
-
-