@ManagedObject(value="Extension Stack") public class ExtensionStack extends ContainerLifeCycle implements IncomingFrames, OutgoingFrames
AbstractLifeCycle.AbstractLifeCycleListenerContainer.InheritedListener, Container.ListenerLifeCycle.Listener| 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(Appendable out,
String indent) |
List<Extension> |
getExtensions() |
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(WebSocketException e) |
void |
incomingFrame(Frame frame) |
void |
negotiate(List<ExtensionConfig> configs)
Perform the extension negotiation.
|
void |
outgoingFrame(Frame frame,
WriteCallback callback)
A frame, and optional callback, intended for the network.
|
void |
setNextIncoming(IncomingFrames nextIncoming) |
void |
setNextOutgoing(OutgoingFrames nextOutgoing) |
String |
toString() |
addBean, addBean, addBean, contains, destroy, doStop, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, setBeans, setStopTimeout, start, unmanage, 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 Exception
ContainerLifeCycledoStart in class ContainerLifeCycleExceptionpublic void dump(Appendable out, String indent) throws IOException
dump in interface Dumpabledump in class ContainerLifeCycleIOException@ManagedAttribute(name="Extension List", readonly=true) public List<Extension> getExtensions()
public 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(WebSocketException e)
incomingError in interface IncomingFramespublic void incomingFrame(Frame frame)
incomingFrame in interface IncomingFramespublic void negotiate(List<ExtensionConfig> configs)
For the list of negotiated extensions, use getNegotiatedExtensions()
configs - the configurations being requestedpublic void outgoingFrame(Frame frame, WriteCallback callback)
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.callback - the optional callback to use for success/failure of the network write operation. Can be null.public void setNextIncoming(IncomingFrames nextIncoming)
public void setNextOutgoing(OutgoingFrames nextOutgoing)
Copyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.