-
-
Field Summary
Fields Modifier and Type Field Description private final StringprovidedProtocol
-
Method Summary
Modifier and Type Method Description StringgetProvidedProtocol()Return the specific Sec-WebSocket-protocol header offer for this protocol if the endpoint. booleanacceptProvidedProtocol(String inputProtocolHeader)Check if the received Sec-WebSocket-Protocol header field contains a offer for the specificprotocol IProtocolcopyInstance()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. StringtoString()booleanequals(Object o)inthashCode()-
-
Constructor Detail
-
Protocol
Protocol(String providedProtocol)
Constructor for a Sec-Websocket-Protocol- Parameters:
providedProtocol- the protocol string
-
-
Method Detail
-
getProvidedProtocol
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.
-
acceptProvidedProtocol
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
-
copyInstance
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.
-
hashCode
int hashCode()
-
-
-
-