| Constructor | Description |
|---|---|
Protocol(java.lang.String providedProtocol) |
Constructor for a Sec-Websocket-Protocol
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
acceptProvidedProtocol(java.lang.String inputProtocolHeader) |
Check if the received Sec-WebSocket-Protocol header field contains a offer for the specific protocol
|
IProtocol |
copyInstance() |
To prevent protocols to be used more than once the Websocket implementation should call this method in order to create a new usable version of a given protocol instance.
|
boolean |
equals(java.lang.Object o) |
|
java.lang.String |
getProvidedProtocol() |
Return the specific Sec-WebSocket-protocol header offer for this protocol if the endpoint.
|
int |
hashCode() |
|
java.lang.String |
toString() |
Return a string which should contain the protocol name as well as additional information about the current configurations for this protocol (DEBUG purposes)
|
public Protocol(java.lang.String providedProtocol)
providedProtocol - the protocol stringpublic boolean acceptProvidedProtocol(java.lang.String inputProtocolHeader)
IProtocolacceptProvidedProtocol in interface IProtocolinputProtocolHeader - the received Sec-WebSocket-Protocol header field offered by the other endpointpublic java.lang.String getProvidedProtocol()
IProtocolgetProvidedProtocol in interface IProtocolpublic IProtocol copyInstance()
IProtocolcopyInstance in interface IProtocolpublic java.lang.String toString()
IProtocolpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object