public interface IHandshaker
Modifier and Type | Method and Description |
---|---|
String |
getClosingReason()
Returns a detailed reason why the handshake phase could not finished
successfully.
|
IExtension |
getExtension(String name)
Returns the negotiated extension identified by the specified name.
|
String[] |
getExtensionNames()
Returns the names of all extensions that have been negotiated
|
IExtension[] |
getExtensions()
Returns all extensions that have been negotiated
|
String |
getSubProtocol()
Return the negotiated sub-protocol.
|
URI |
getUri()
The URI identifying the Web Socket connection for both the client and
server sessions.
|
HandshakeFrame |
handshake()
Initiates the handshake phase by Web Socket clients.
|
HandshakeFrame |
handshake(HandshakeFrame frame)
Processes the handshake frame received from a Web Socket client.
|
boolean |
hasExtensions()
Tells is any extension has been negotiated
|
boolean |
isClientMode()
Tells the mode (server/client) this handshaker is operating
|
boolean |
isClosing()
Tells if this handshake is closing without successfully finishing the
handshake phase.
|
boolean |
isFinished()
Tells if this handshake has successfully finished the handshake phase.
|
void |
setSession(ISession session)
Sets the session object this handshaker is associated with.
|
void |
updateExtensionDecoders(ICodecPipeline pipeline)
Called to updated the pipeline decoders based on the negotiated extensions
|
void |
updateExtensionEncoders(ICodecPipeline pipeline)
Called to updated the pipeline encoders based on the negotiated extensions
|
void setSession(ISession session)
session
- the session objectString getClosingReason()
IExtension getExtension(String name)
name
- the name of the extension to returnnull
if no extension with specified name has
been negotiatedString[] getExtensionNames()
IExtension[] getExtensions()
String getSubProtocol()
null
if no sub-protocol has
been negotiated.URI getUri()
HandshakeFrame handshake()
HandshakeFrame handshake(HandshakeFrame frame)
frame
- the received handshake frameboolean hasExtensions()
true
if at least one extension has been negotiatedboolean isClientMode()
true
if this handshaker is operating in the client modeboolean isClosing()
true
if this handshaker is closingboolean isFinished()
true
if the handshake phase has been successfully finishedvoid updateExtensionDecoders(ICodecPipeline pipeline)
pipeline
- the pipeline to be updatedvoid updateExtensionEncoders(ICodecPipeline pipeline)
pipeline
- the pipeline to be updatedCopyright © 2017–2022 SNF4J.ORG. All rights reserved.