Class AbstractExtension
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.websocket.common.extensions.AbstractExtension
- All Implemented Interfaces:
org.eclipse.jetty.util.component.LifeCycle
,Extension
,IncomingFrames
,OutgoingFrames
- Direct Known Subclasses:
CompressExtension
,FragmentExtension
,FrameCaptureExtension
,IdentityExtension
@ManagedObject("Abstract Extension")
public abstract class AbstractExtension
extends org.eclipse.jetty.util.component.AbstractLifeCycle
implements Extension
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.eclipse.jetty.io.ByteBufferPool
private ExtensionConfig
private LogicalConnection
private final org.eclipse.jetty.util.log.Logger
private IncomingFrames
private OutgoingFrames
private WebSocketPolicy
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.jetty.io.ByteBufferPool
The active configuration for this extension.getName()
TheSec-WebSocket-Extensions
name for this extension.void
init
(WebSocketPolicy policy, org.eclipse.jetty.io.ByteBufferPool bufferPool) void
init
(WebSocketContainerScope container) Deprecated.boolean
Used to indicate that the extension makes use of the RSV1 bit of the base websocket framing.boolean
Used to indicate that the extension makes use of the RSV2 bit of the base websocket framing.boolean
Used to indicate that the extension makes use of the RSV3 bit of the base websocket framing.protected void
nextIncomingFrame
(Frame frame) protected void
nextOutgoingFrame
(Frame frame, WriteCallback callback, BatchMode batchMode) void
setBufferPool
(org.eclipse.jetty.io.ByteBufferPool bufferPool) void
setConfig
(ExtensionConfig config) void
setConnection
(LogicalConnection connection) void
setNextIncomingFrames
(IncomingFrames nextIncoming) Set the nextIncomingFrames
to call in the chain.void
setNextOutgoingFrames
(OutgoingFrames nextOutgoing) Set the nextOutgoingFrames
to call in the chain.void
setPolicy
(WebSocketPolicy policy) toString()
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, doStart, doStop, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.websocket.api.extensions.IncomingFrames
incomingFrame
Methods inherited from interface org.eclipse.jetty.websocket.api.extensions.OutgoingFrames
outgoingFrame
-
Field Details
-
log
private final org.eclipse.jetty.util.log.Logger log -
policy
-
bufferPool
private org.eclipse.jetty.io.ByteBufferPool bufferPool -
config
-
connection
-
nextOutgoing
-
nextIncoming
-
-
Constructor Details
-
AbstractExtension
public AbstractExtension()
-
-
Method Details
-
init
Deprecated. -
init
-
getBufferPool
public org.eclipse.jetty.io.ByteBufferPool getBufferPool() -
getConfig
Description copied from interface:Extension
The active configuration for this extension. -
getConnection
-
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. -
getNextIncoming
@ManagedAttribute(name="Next Incoming Frame Handler", readonly=true) public IncomingFrames getNextIncoming() -
getNextOutgoing
@ManagedAttribute(name="Next Outgoing Frame Handler", readonly=true) public OutgoingFrames getNextOutgoing() -
getPolicy
-
isRsv1User
public boolean isRsv1User()Used to indicate that the extension makes use of the RSV1 bit of the base websocket framing.This is used to adjust validation during parsing, as well as a checkpoint against 2 or more extensions all simultaneously claiming ownership of RSV1.
- Specified by:
isRsv1User
in interfaceExtension
- Returns:
- true if extension uses RSV1 for its own purposes.
-
isRsv2User
public boolean isRsv2User()Used to indicate that the extension makes use of the RSV2 bit of the base websocket framing.This is used to adjust validation during parsing, as well as a checkpoint against 2 or more extensions all simultaneously claiming ownership of RSV2.
- Specified by:
isRsv2User
in interfaceExtension
- Returns:
- true if extension uses RSV2 for its own purposes.
-
isRsv3User
public boolean isRsv3User()Used to indicate that the extension makes use of the RSV3 bit of the base websocket framing.This is used to adjust validation during parsing, as well as a checkpoint against 2 or more extensions all simultaneously claiming ownership of RSV3.
- Specified by:
isRsv3User
in interfaceExtension
- Returns:
- true if extension uses RSV3 for its own purposes.
-
nextIncomingFrame
-
nextOutgoingFrame
-
setBufferPool
public void setBufferPool(org.eclipse.jetty.io.ByteBufferPool bufferPool) -
setConfig
-
setConnection
-
setNextIncomingFrames
Description copied from interface:Extension
Set the nextIncomingFrames
to call in the chain.- Specified by:
setNextIncomingFrames
in interfaceExtension
- Parameters:
nextIncoming
- the next incoming extension
-
setNextOutgoingFrames
Description copied from interface:Extension
Set the nextOutgoingFrames
to call in the chain.- Specified by:
setNextOutgoingFrames
in interfaceExtension
- Parameters:
nextOutgoing
- the next outgoing extension
-
setPolicy
-
toString
- Overrides:
toString
in classorg.eclipse.jetty.util.component.AbstractLifeCycle
-