Package org.eclipse.jetty.websocket.core
Interface Extension
- All Superinterfaces:
AutoCloseable
,Closeable
,IncomingFrames
,OutgoingFrames
- All Known Implementing Classes:
AbstractExtension
,FragmentExtension
,FrameCaptureExtension
,IdentityExtension
,PerMessageDeflateExtension
,ValidationExtension
Interface for WebSocket Extensions.
That Frame
s are passed through the Extension via the IncomingFrames
and OutgoingFrames
interfaces
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
Used to clean up any resources after connection close.The active configuration for this extension.getName()
TheSec-WebSocket-Extensions
name for this extension.void
init
(ExtensionConfig config, WebSocketComponents components) 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.void
setCoreSession
(CoreSession coreSession) void
setNextIncomingFrames
(IncomingFrames nextIncoming) Set the nextIncomingFrames
to call in the chain.void
setNextOutgoingFrames
(OutgoingFrames nextOutgoing) Set the nextOutgoingFrames
to call in the chain.Methods inherited from interface org.eclipse.jetty.websocket.core.IncomingFrames
onFrame
Methods inherited from interface org.eclipse.jetty.websocket.core.OutgoingFrames
sendFrame
-
Method Details
-
init
-
close
default void close()Used to clean up any resources after connection close.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getConfig
ExtensionConfig getConfig()The active configuration for this extension.- Returns:
- the configuration for this extension. never null.
-
getName
String getName()TheSec-WebSocket-Extensions
name for this extension.Also known as the
extension-token
per Section 9.1. Negotiating Extensions.- Returns:
- the name of the extension
-
isRsv1User
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.
- Returns:
- true if extension uses RSV1 for its own purposes.
-
isRsv2User
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.
- Returns:
- true if extension uses RSV2 for its own purposes.
-
isRsv3User
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.
- Returns:
- true if extension uses RSV3 for its own purposes.
-
setNextIncomingFrames
Set the nextIncomingFrames
to call in the chain.- Parameters:
nextIncoming
- the next incoming extension
-
setNextOutgoingFrames
Set the nextOutgoingFrames
to call in the chain.- Parameters:
nextOutgoing
- the next outgoing extension
-
setCoreSession
- Parameters:
coreSession
- theCoreSession
for this Extension.
-