Package org.glassfish.tyrus.core
Class TyrusExtension
java.lang.Object
org.glassfish.tyrus.core.TyrusExtension
- All Implemented Interfaces:
Extension
,Serializable
WebSocket
Extension
implementation.- Author:
- Pavel Bucek
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.websocket.Extension
Extension.Parameter
-
Constructor Summary
ConstructorDescriptionTyrusExtension
(String name) CreateExtension
with specific name.TyrusExtension
(String name, List<Extension.Parameter> parameters) CreateExtension
with name and parameters. -
Method Summary
Modifier and TypeMethodDescriptionboolean
fromHeaders
(List<String> extensionHeaders) fromString
(List<String> s) Parsing of oneExtension
.getName()
The name of the extension.The extension parameters for this extension in the order they appear in the http headers.int
hashCode()
toString()
-
Constructor Details
-
TyrusExtension
CreateExtension
with specific name.- Parameters:
name
- extension name.- Throws:
IllegalArgumentException
- when name is null or empty string.
-
TyrusExtension
CreateExtension
with name and parameters.- Parameters:
name
- extension name.parameters
- extension parameters.
-
-
Method Details
-
getName
Description copied from interface:Extension
The name of the extension. -
getParameters
Description copied from interface:Extension
The extension parameters for this extension in the order they appear in the http headers.- Specified by:
getParameters
in interfaceExtension
- Returns:
- The read-only Map of extension parameters belonging to this extension.
-
toString
-
equals
-
hashCode
public int hashCode() -
fromString
Parsing of oneExtension
.- Parameters:
s
-List
ofString
containingExtensions
.- Returns:
- List of extensions represented as
TyrusExtension
.
-
fromHeaders
- Parameters:
extensionHeaders
- Http Extension headers.- Returns:
- list of parsed
Extensions
.
-