public class PerMessageDeflateExtension extends CompressionExtension
Constructor and Description |
---|
PerMessageDeflateExtension() |
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
void |
isFrameValid(Framedata inputFrame)
This extension requires the RSV1 bit to be set only for the first frame.
|
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)
|
equals, hashCode, reset
public void decodeFrame(Framedata inputFrame) throws InvalidDataException
IExtension
decodeFrame
in interface IExtension
decodeFrame
in class DefaultExtension
inputFrame
- 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)
IExtension
encodeFrame
in interface IExtension
encodeFrame
in class DefaultExtension
inputFrame
- the frame, which has do be encoded to be used on the other endpointpublic boolean acceptProvidedExtensionAsServer(String inputExtension)
IExtension
acceptProvidedExtensionAsServer
in interface IExtension
acceptProvidedExtensionAsServer
in class DefaultExtension
inputExtension
- the received Sec-WebSocket-Extensions header field offered by the other endpointpublic boolean acceptProvidedExtensionAsClient(String inputExtension)
IExtension
acceptProvidedExtensionAsClient
in interface IExtension
acceptProvidedExtensionAsClient
in class DefaultExtension
inputExtension
- the received Sec-WebSocket-Extensions header field offered by the other endpointpublic String getProvidedExtensionAsClient()
IExtension
getProvidedExtensionAsClient
in interface IExtension
getProvidedExtensionAsClient
in class DefaultExtension
public String getProvidedExtensionAsServer()
IExtension
getProvidedExtensionAsServer
in interface IExtension
getProvidedExtensionAsServer
in class DefaultExtension
public IExtension copyInstance()
IExtension
copyInstance
in interface IExtension
copyInstance
in class DefaultExtension
public void isFrameValid(Framedata inputFrame) throws InvalidDataException
isFrameValid
in interface IExtension
isFrameValid
in class CompressionExtension
inputFrame
- the received frameInvalidDataException
- Throw InvalidDataException if the received frame is not correctly implementing the specification for the specific extensionpublic String toString()
IExtension
toString
in interface IExtension
toString
in class DefaultExtension
Copyright © 2020. All rights reserved.