-
-
Field Summary
Fields Modifier and Type Field Description private final String
providedProtocol
-
Method Summary
Modifier and Type Method Description String
getProvidedProtocol()
Return the specific Sec-WebSocket-protocol header offer for this protocol if the endpoint. boolean
acceptProvidedProtocol(String inputProtocolHeader)
Check if the received Sec-WebSocket-Protocol header field contains a offer for the specificprotocol 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. String
toString()
boolean
equals(Object o)
int
hashCode()
-
-
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()
-
-
-
-