Class FrameCaptureExtension
java.lang.Object
org.eclipse.jetty.websocket.core.AbstractExtension
org.eclipse.jetty.websocket.core.internal.FrameCaptureExtension
- All Implemented Interfaces:
Closeable,AutoCloseable,Extension,IncomingFrames,OutgoingFrames
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()TheSec-WebSocket-Extensionsname for this extension.voidinit(ExtensionConfig config, WebSocketComponents components) voidProcess the incoming frame.voidA frame, and optional callback, intended for the network layer.Methods inherited from class org.eclipse.jetty.websocket.core.AbstractExtension
getBufferPool, getConfig, getConfiguration, getCoreSession, getDeflaterPool, getInflaterPool, getNextIncoming, getNextOutgoing, isRsv1User, isRsv2User, isRsv3User, nextIncomingFrame, nextOutgoingFrame, setCoreSession, setNextIncomingFrames, setNextOutgoingFrames, toString
-
Constructor Details
-
FrameCaptureExtension
public FrameCaptureExtension()
-
-
Method Details
-
getName
Description copied from interface:ExtensionTheSec-WebSocket-Extensionsname for this extension.Also known as the
extension-tokenper Section 9.1. Negotiating Extensions.- Specified by:
getNamein interfaceExtension- Overrides:
getNamein classAbstractExtension- Returns:
- the name of the extension
-
onFrame
Description copied from interface:IncomingFramesProcess the incoming frame.
Note: if you need to hang onto any information from the frame, be sure to copy it, as the information contained in the Frame will be released and/or reused by the implementation.
Failure of the callback will propagate the failure back to the
CoreSessionto fail the connection and attempt to send a closeFrameif one has not been sent.- Specified by:
onFramein interfaceIncomingFrames- Overrides:
onFramein classAbstractExtension- Parameters:
frame- the frame to process.callback- the read completion.
-
sendFrame
Description copied from interface:OutgoingFramesA frame, and optional callback, intended for the network layer.Note: the frame can undergo many transformations in the various layers and extensions present in the implementation.
If you are implementing a mutation, you are obliged to handle the incoming WriteCallback appropriately.
- Specified by:
sendFramein interfaceOutgoingFrames- Overrides:
sendFramein classAbstractExtension- Parameters:
frame- the frame to eventually write to the network layer.callback- the callback to notify when the frame is written.batch- the batch mode requested by the sender.
-
init
- Specified by:
initin interfaceExtension- Overrides:
initin classAbstractExtension
-