public interface IExtension
Modifier and Type | Method and Description |
---|---|
IExtension |
acceptOffer(List<String> offer)
Called by the Web Socket server to accept the received extension negotiation
offer.
|
Object |
getGroupId()
Returns an object that identifies the group to which the extension belongs.
|
String |
getName()
Returns the name of the extension.
|
List<String> |
offer()
Called by the Web Socket client to prepare the extension negotiation offer.
|
List<String> |
response()
Called by the Web Socket server to prepare the extension negotiation response.
|
void |
updateDecoders(ICodecPipeline pipeline)
Called to update the decoder pipeline.
|
void |
updateEncoders(ICodecPipeline pipeline)
Called to update the encoder pipeline.
|
IExtension |
validateResponse(List<String> response)
Called by the Web Socket client to validate the received extension negotiation
response.
|
String getName()
Object getGroupId()
IExtension acceptOffer(List<String> offer) throws InvalidExtensionException
extension-name, param-name1, param-value1, ... , param-nameN, param-valueNIf a parameter was offered with no value its value in the list will be
null
. For example following extension negotiation offer
foo; y=10; x; z="5"will be split into following list of tokens:
"foo", "y", "10", "x", null, "z", "5"
offer
- the offer split into a list of tokensnull
if the negotiation offer could not be accepted by this
extension.InvalidExtensionException
- if the negotiation offer syntax was invalidIExtension validateResponse(List<String> response) throws InvalidExtensionException
extension-name, param-name1, param-value1, ... , param-nameN, param-valueNIf a parameter was responded with no value its value in the list will be
null
. For example following extension negotiation response
foo; y=10; x; z="5"will be split into following list of tokens:
"foo", "y", "10", "x", null, "z", "5"
response
- the response split into a list of tokensnull
if the negotiation response could not be validated by this
extension.InvalidExtensionException
- if the negotiation response syntax was invalidList<String> offer()
extension-name, param-name1, param-value1, ... , param-nameN, param-valueNIf a parameter in the offer has no value its value in the list have to be
null
. For example following extension negotiation offer
foo; y; x=10have to be split into following list of tokens:
"foo", "y", null, "y", "10"
List<String> response()
extension-name, param-name1, param-value1, ... , param-nameN, param-valueNIf a parameter in the response has no value its value in the list have to be
null
. For example following extension negotiation response
foo; y; x=10have to be split into following list of tokens:
"foo", "y", null, "y", "10"
void updateEncoders(ICodecPipeline pipeline)
pipeline
- the pipeline to updatevoid updateDecoders(ICodecPipeline pipeline)
pipeline
- the pipeline to updateCopyright © 2017–2022 SNF4J.ORG. All rights reserved.