Class ExtensionStack
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.websocket.common.extensions.ExtensionStack
- All Implemented Interfaces:
org.eclipse.jetty.util.component.Container, org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.Dumpable.DumpableContainer, org.eclipse.jetty.util.component.LifeCycle, IncomingFrames, OutgoingFrames
@ManagedObject("Extension Stack")
public class ExtensionStack
extends org.eclipse.jetty.util.component.ContainerLifeCycle
implements IncomingFrames, OutgoingFrames
Represents the stack of Extensions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate static classNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Queue<ExtensionStack.FrameEntry> private final ExtensionFactoryprivate final org.eclipse.jetty.util.IteratingCallbackprivate static final org.eclipse.jetty.util.log.Loggerprivate IncomingFramesprivate OutgoingFramesFields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPINGFields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidprotected voiddoStart()dumpSelf()private IncomingFramesprivate OutgoingFramesGet the list of negotiated extensions, each entry being a full "name; params" extension configurationprivate intbooleanvoidincomingFrame(Frame frame) Process the incoming frame.voidnegotiate(List<ExtensionConfig> configs) Perform the extension negotiation.private voidvoidoutgoingFrame(Frame frame, WriteCallback callback, BatchMode batchMode) A frame, and optional callback, intended for the network layer.private ExtensionStack.FrameEntryvoidsetNextIncoming(IncomingFrames nextIncoming) voidsetNextOutgoing(OutgoingFrames nextOutgoing) voidsetPolicy(WebSocketPolicy policy) toString()Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, doStop, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Field Details
-
LOG
private static final org.eclipse.jetty.util.log.Logger LOG -
entries
-
flusher
private final org.eclipse.jetty.util.IteratingCallback flusher -
factory
-
extensions
-
nextIncoming
-
nextOutgoing
-
-
Constructor Details
-
ExtensionStack
-
-
Method Details
-
configure
-
configure
-
doStart
-
dumpSelf
- Specified by:
dumpSelfin interfaceorg.eclipse.jetty.util.component.Dumpable
-
getExtensions
-
getLastIncoming
-
getLastOutgoing
-
getNegotiatedExtensions
Get the list of negotiated extensions, each entry being a full "name; params" extension configuration- Returns:
- list of negotiated extensions
-
getNextIncoming
@ManagedAttribute(name="Next Incoming Frames Handler", readonly=true) public IncomingFrames getNextIncoming() -
getNextOutgoing
@ManagedAttribute(name="Next Outgoing Frames Handler", readonly=true) public OutgoingFrames getNextOutgoing() -
hasNegotiatedExtensions
public boolean hasNegotiatedExtensions() -
incomingFrame
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.
- Specified by:
incomingFramein interfaceIncomingFrames- Parameters:
frame- the frame to process
-
negotiate
Perform the extension negotiation.For the list of negotiated extensions, use
getNegotiatedExtensions()- Parameters:
configs- the configurations being requested
-
outgoingFrame
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:
outgoingFramein interfaceOutgoingFrames- Parameters:
frame- the frame to eventually write to the network layer.callback- the callback to notify when the frame is written.batchMode- the batch mode requested by the sender.
-
setNextIncoming
-
setNextOutgoing
-
setPolicy
-
offerEntry
-
pollEntry
-
getQueueSize
private int getQueueSize() -
toString
- Overrides:
toStringin classorg.eclipse.jetty.util.component.AbstractLifeCycle
-