Package org.eclipse.jetty.websocket.core
Class ExtensionConfig
java.lang.Object
org.eclipse.jetty.websocket.core.ExtensionConfig
- Direct Known Subclasses:
JakartaWebSocketExtensionConfig
Represents an Extension Configuration, as seen during the connection Handshake process.
-
Constructor Summary
ConstructorDescriptionExtensionConfig
(String parameterizedName) ExtensionConfig
(String name, Map<String, String> parameters) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptiongetName()
final int
getParameter
(String key, int defValue) final String
getParameter
(String key, String defValue) final String
final String
Return parameters found in request URI.boolean
static ExtensionConfig
Parse a single parameterized name.static List<ExtensionConfig>
parseEnum
(Enumeration<String> valuesEnum) Parse enumeration ofSec-WebSocket-Extensions
header values into aExtensionConfig
liststatic List<ExtensionConfig>
Parse 1 or more rawSec-WebSocket-Extensions
header values into aExtensionConfig
liststatic void
quoteIfNeeded
(StringBuilder buf, String str) void
final void
setParameter
(String key) final void
setParameter
(String key, int value) final void
setParameter
(String key, String value) static String
toHeaderValue
(List<ExtensionConfig> configs) Convert a list ofExtensionConfig
to a header valuetoString()
-
Constructor Details
-
ExtensionConfig
Copy constructor- Parameters:
copy
- the extension config to copy
-
ExtensionConfig
-
ExtensionConfig
-
-
Method Details
-
parse
Parse a single parameterized name.- Parameters:
parameterizedName
- the parameterized name- Returns:
- the ExtensionConfig
-
parseEnum
Parse enumeration ofSec-WebSocket-Extensions
header values into aExtensionConfig
list- Parameters:
valuesEnum
- the raw header values enum- Returns:
- the list of extension configs
-
parseList
Parse 1 or more rawSec-WebSocket-Extensions
header values into aExtensionConfig
list- Parameters:
rawSecWebSocketExtensions
- the raw header values- Returns:
- the list of extension configs
-
toHeaderValue
Convert a list ofExtensionConfig
to a header value- Parameters:
configs
- the list of extension configs- Returns:
- the header value (null if no configs present)
-
isInternalExtension
public boolean isInternalExtension() -
getInternalParameters
-
removeInternalParameters
public void removeInternalParameters() -
getName
-
getParameter
-
getParameter
-
getParameterizedName
-
getParameterizedNameWithoutInternalParams
-
quoteIfNeeded
-
getParameterKeys
-
getParameters
Return parameters found in request URI.- Returns:
- the parameter map
-
setParameter
-
setParameter
-
setParameter
-
toString
-