public class DefaultExtension extends Object implements IExtension
This is a fallback and will always be available for a Draft_6455
| 构造器和说明 |
|---|
DefaultExtension() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
acceptProvidedExtensionAsClient(String inputExtension)
Check if the received Sec-WebSocket-Extensions header field contains a offer for the specific extension if the endpoint is in the
role of a client
|
boolean |
acceptProvidedExtensionAsServer(String inputExtension)
Check if the received Sec-WebSocket-Extensions header field contains a offer for the specific extension if the endpoint is in the
role of a server
|
IExtension |
copyInstance()
Extensions must only be by one websocket at all.
|
void |
decodeFrame(Framedata inputFrame)
Decode a frame with a extension specific algorithm.
|
void |
encodeFrame(Framedata inputFrame)
Encode a frame with a extension specific algorithm.
|
boolean |
equals(Object o) |
String |
getProvidedExtensionAsClient()
Return the specific Sec-WebSocket-Extensions header offer for this extension if the endpoint is in the role of a client.
|
String |
getProvidedExtensionAsServer()
Return the specific Sec-WebSocket-Extensions header offer for this extension if the endpoint is in the role of a server.
|
int |
hashCode() |
void |
isFrameValid(Framedata inputFrame)
Check if the received frame is correctly implemented by the other endpoint and there are no specification errors (like wrongly set
RSV)
|
void |
reset()
Cleaning up internal stats when the draft gets reset.
|
String |
toString()
Return a string which should contain the class name as well as additional information about the current configurations for this
extension (DEBUG purposes)
|
public void decodeFrame(Framedata inputFrame) throws InvalidDataException
IExtensiondecodeFrame 在接口中 IExtensioninputFrame - the frame, which has do be decoded to be used in the applicationInvalidDataException - Throw InvalidDataException if the received frame is not correctly implemented by the other endpoint or
there are other protocol errors/decoding errorspublic void encodeFrame(Framedata inputFrame)
IExtensionencodeFrame 在接口中 IExtensioninputFrame - the frame, which has do be encoded to be used on the other endpointpublic boolean acceptProvidedExtensionAsServer(String inputExtension)
IExtensionacceptProvidedExtensionAsServer 在接口中 IExtensioninputExtension - the received Sec-WebSocket-Extensions header field offered by the other endpointpublic boolean acceptProvidedExtensionAsClient(String inputExtension)
IExtensionacceptProvidedExtensionAsClient 在接口中 IExtensioninputExtension - the received Sec-WebSocket-Extensions header field offered by the other endpointpublic void isFrameValid(Framedata inputFrame) throws InvalidDataException
IExtensionisFrameValid 在接口中 IExtensioninputFrame - the received frameInvalidDataException - Throw InvalidDataException if the received frame is not correctly implementing the specification for the
specific extensionpublic String getProvidedExtensionAsClient()
IExtensiongetProvidedExtensionAsClient 在接口中 IExtensionpublic String getProvidedExtensionAsServer()
IExtensiongetProvidedExtensionAsServer 在接口中 IExtensionpublic IExtension copyInstance()
IExtensioncopyInstance 在接口中 IExtensionpublic void reset()
IExtensionreset 在接口中 IExtensionpublic String toString()
IExtensiontoString 在接口中 IExtensiontoString 在类中 ObjectCopyright © 2023. All rights reserved.