Class FragmentExtension
java.lang.Object
org.eclipse.jetty.websocket.core.AbstractExtension
org.eclipse.jetty.websocket.core.internal.FragmentExtension
- All Implemented Interfaces:
Closeable,AutoCloseable,Extension,IncomingFrames,DemandChain,OutgoingFrames
Fragment Extension
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddemand(long n) getName()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.voidsetNextDemand(LongConsumer nextDemand) 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
-
FragmentExtension
public FragmentExtension()
-
-
Method Details
-
demand
public void demand(long n) - Specified by:
demandin interfaceDemandChain
-
setNextDemand
- Specified by:
setNextDemandin interfaceDemandChain
-
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
-