@ManagedObject(value="Extension Stack") public class ExtensionStack extends ContainerLifeCycle implements IncomingFrames, OutgoingFrames
AbstractLifeCycle.AbstractLifeCycleListenerContainer.InheritedListener, Container.ListenerLifeCycle.ListenerFAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING| Constructor and Description |
|---|
ExtensionStack(ExtensionFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Generator generator) |
void |
configure(Parser parser) |
protected void |
doStart()
Starts the managed lifecycle beans in the order they were added.
|
void |
dump(java.lang.Appendable out,
java.lang.String indent) |
java.util.List<Extension> |
getExtensions() |
java.util.List<ExtensionConfig> |
getNegotiatedExtensions()
Get the list of negotiated extensions, each entry being a full "name; params" extension configuration
|
IncomingFrames |
getNextIncoming() |
OutgoingFrames |
getNextOutgoing() |
boolean |
hasNegotiatedExtensions() |
void |
incomingError(java.lang.Throwable e) |
void |
incomingFrame(Frame frame)
Process the incoming frame.
|
void |
negotiate(java.util.List<ExtensionConfig> configs)
Perform the extension negotiation.
|
void |
outgoingFrame(Frame frame,
WriteCallback callback,
BatchMode batchMode)
A frame, and optional callback, intended for the network layer.
|
void |
setNextIncoming(IncomingFrames nextIncoming) |
void |
setNextOutgoing(OutgoingFrames nextOutgoing) |
void |
setPolicy(WebSocketPolicy policy) |
java.lang.String |
toString() |
addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, doStop, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic ExtensionStack(ExtensionFactory factory)
public void configure(Generator generator)
public void configure(Parser parser)
protected void doStart()
throws java.lang.Exception
ContainerLifeCycledoStart in class ContainerLifeCyclejava.lang.Exceptionpublic void dump(java.lang.Appendable out,
java.lang.String indent)
throws java.io.IOException
dump in interface Dumpabledump in class ContainerLifeCyclejava.io.IOException@ManagedAttribute(name="Extension List", readonly=true) public java.util.List<Extension> getExtensions()
public java.util.List<ExtensionConfig> getNegotiatedExtensions()
@ManagedAttribute(name="Next Incoming Frames Handler", readonly=true) public IncomingFrames getNextIncoming()
@ManagedAttribute(name="Next Outgoing Frames Handler", readonly=true) public OutgoingFrames getNextOutgoing()
public boolean hasNegotiatedExtensions()
public void incomingError(java.lang.Throwable e)
incomingError in interface IncomingFramespublic void incomingFrame(Frame frame)
IncomingFramesNote: 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.
incomingFrame in interface IncomingFramesframe - the frame to processpublic void negotiate(java.util.List<ExtensionConfig> configs)
For the list of negotiated extensions, use getNegotiatedExtensions()
configs - the configurations being requestedpublic void outgoingFrame(Frame frame, WriteCallback callback, BatchMode batchMode)
OutgoingFramesNote: 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.
outgoingFrame in interface OutgoingFramesframe - 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.public void setNextIncoming(IncomingFrames nextIncoming)
public void setNextOutgoing(OutgoingFrames nextOutgoing)
public void setPolicy(WebSocketPolicy policy)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 1995–2018 Webtide. All rights reserved.