public class PerMessageDeflateExtension extends Object implements ExtendedExtension
TODO: - parameters (window sizes, context takeovers). - context (some utility methods to get the typed params - T getParam(Class))
ExtendedExtension.ExtensionContext
Constructor and Description |
---|
PerMessageDeflateExtension() |
Modifier and Type | Method and Description |
---|---|
void |
destroy(ExtendedExtension.ExtensionContext context)
Context lifecycle method.
|
String |
getName() |
List<javax.websocket.Extension.Parameter> |
getParameters() |
List<javax.websocket.Extension.Parameter> |
onExtensionNegotiation(ExtendedExtension.ExtensionContext context,
List<javax.websocket.Extension.Parameter> requestedParameters)
Parameter negotiation.
|
void |
onHandshakeResponse(ExtendedExtension.ExtensionContext context,
List<javax.websocket.Extension.Parameter> responseParameters)
Called only on the client side when handshake response arrives.
|
Frame |
processIncoming(ExtendedExtension.ExtensionContext context,
Frame frame)
Process incoming frame.
|
Frame |
processOutgoing(ExtendedExtension.ExtensionContext context,
Frame frame)
Process outgoing frame.
|
public Frame processIncoming(ExtendedExtension.ExtensionContext context, Frame frame)
ExtendedExtension
processIncoming
in interface ExtendedExtension
context
- per-connection/session context.frame
- websocket frame representation.public Frame processOutgoing(ExtendedExtension.ExtensionContext context, Frame frame)
ExtendedExtension
processOutgoing
in interface ExtendedExtension
context
- per-connection/session context.frame
- websocket frame representation.public List<javax.websocket.Extension.Parameter> onExtensionNegotiation(ExtendedExtension.ExtensionContext context, List<javax.websocket.Extension.Parameter> requestedParameters)
ExtendedExtension
onExtensionNegotiation
in interface ExtendedExtension
context
- extension context.requestedParameters
- requested parameters (from handshake request).public void onHandshakeResponse(ExtendedExtension.ExtensionContext context, List<javax.websocket.Extension.Parameter> responseParameters)
ExtendedExtension
onHandshakeResponse
in interface ExtendedExtension
context
- extension context.responseParameters
- extension parameters returned from the server.public void destroy(ExtendedExtension.ExtensionContext context)
ExtendedExtension
ExtendedExtension.ExtensionContext
won't be used
after this method is called.destroy
in interface ExtendedExtension
context
- extension context to be destroyed.public String getName()
getName
in interface javax.websocket.Extension
public List<javax.websocket.Extension.Parameter> getParameters()
getParameters
in interface javax.websocket.Extension
Copyright © 2012-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.