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
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
TheSec-WebSocket-Extensions
name for this extension.void
init
(ExtensionConfig config, WebSocketComponents components) void
Process the incoming frame.void
A frame, and optional callback, intended for the network layer.Methods inherited from class org.eclipse.jetty.websocket.core.AbstractExtension
getByteBufferPool, 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:Extension
TheSec-WebSocket-Extensions
name for this extension.Also known as the
extension-token
per Section 9.1. Negotiating Extensions.- Specified by:
getName
in interfaceExtension
- Overrides:
getName
in classAbstractExtension
- Returns:
- the name of the extension
-
onFrame
Description copied from interface:IncomingFrames
Process 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
CoreSession
to fail the connection and attempt to send a closeFrame
if one has not been sent.- Specified by:
onFrame
in interfaceIncomingFrames
- Overrides:
onFrame
in classAbstractExtension
- Parameters:
frame
- the frame to process.callback
- the read completion.
-
sendFrame
Description copied from interface:OutgoingFrames
A 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 Callback appropriately.
- Specified by:
sendFrame
in interfaceOutgoingFrames
- Overrides:
sendFrame
in 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:
init
in interfaceExtension
- Overrides:
init
in classAbstractExtension
-