-
public interface IProtocol
Interface which specifies all required methods for a Sec-WebSocket-Protocol
-
-
Method Summary
Modifier and Type Method Description abstract boolean
acceptProvidedProtocol(String inputProtocolHeader)
Check if the received Sec-WebSocket-Protocol header field contains a offer for the specificprotocol abstract String
getProvidedProtocol()
Return the specific Sec-WebSocket-protocol header offer for this protocol if the endpoint. abstract IProtocol
copyInstance()
To prevent protocols to be used more than once the Websocket implementation should call thismethod in order to create a new usable version of a given protocol instance. abstract String
toString()
Return a string which should contain the protocol name as well as additional information aboutthe current configurations for this protocol (DEBUG purposes) -
-
Method Detail
-
acceptProvidedProtocol
abstract boolean acceptProvidedProtocol(String inputProtocolHeader)
Check if the received Sec-WebSocket-Protocol header field contains a offer for the specificprotocol
- Parameters:
inputProtocolHeader
- the received Sec-WebSocket-Protocol header field offered by theother endpoint
-
getProvidedProtocol
abstract String getProvidedProtocol()
Return the specific Sec-WebSocket-protocol header offer for this protocol if the endpoint. Ifthe extension returns an empty string (""), the offer will not be included in the handshake.
-
copyInstance
abstract IProtocol copyInstance()
To prevent protocols to be used more than once the Websocket implementation should call thismethod in order to create a new usable version of a given protocol instance.
-
-
-
-