Top Description Methods
io.undertow.websockets.extensions

public Interface ExtensionHandshake

Known Direct Implementers
io.undertow.websockets.extensions.PerMessageDeflateHandshake
Imports
java.util.List, io.undertow.websockets.WebSocketExtension

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 TypeMethod and Description
public WebSocketExtension

Returns:

a new WebSocketExtension instance with parameters accepted; null in case extension request is not accepted
accept
(final WebSocketExtension
the extension request representation
extension
)

Validate if an extension request is accepted.

public ExtensionFunction

Returns:

a new instance ExtensionFunction
create
()

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

public String

Returns:

name of the WebSocket Extension
getName
()

public boolean

Returns:

true if current extension is compatible; false if current extension is not compatible
isIncompatible
(final List<ExtensionHandshake>
a list of negotiated extensions
extensions
)

Validate if current extension is compatible with previously negotiated in the server side.

Method Detail

acceptback to summary
public WebSocketExtension accept(final WebSocketExtension extension)

Validate if an extension request is accepted.

Parameters
extension:WebSocketExtension

the extension request representation

Returns:WebSocketExtension

a new WebSocketExtension instance with parameters accepted; null in case extension request is not accepted

createback to summary
public ExtensionFunction create()

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

Returns:ExtensionFunction

a new instance ExtensionFunction

getNameback to summary
public String getName()
Returns:String

name of the WebSocket Extension

isIncompatibleback to summary
public boolean isIncompatible(final List<ExtensionHandshake> extensions)

Validate if current extension is compatible with previously negotiated in the server side.

Parameters
extensions:List<ExtensionHandshake>

a list of negotiated extensions

Returns:boolean

true if current extension is compatible; false if current extension is not compatible