public class WebSocketExtension
extends java.lang.Object
WebSocket Extension HTTP headers may include parameters and follow RFC 7230 section 3.2
Note that the order of extensions in HTTP headers defines their order of execution, e.g. extensions "foo, bar" will be executed as "bar(foo(message))".
Constructor and Description |
---|
WebSocketExtension(java.lang.String name)
Create a WebSocketExtension with the given name.
|
WebSocketExtension(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> parameters)
Create a WebSocketExtension with the given name and parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getName() |
java.util.Map<java.lang.String,java.lang.String> |
getParameters() |
int |
hashCode() |
static java.util.List<WebSocketExtension> |
parseExtensions(java.lang.String extensions)
Parse the given, comma-separated string into a list of
WebSocketExtension objects. |
java.lang.String |
toString() |
public WebSocketExtension(java.lang.String name)
name
- the name of the extensionpublic WebSocketExtension(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> parameters)
name
- the name of the extensionparameters
- the parameterspublic java.lang.String getName()
public java.util.Map<java.lang.String,java.lang.String> getParameters()
null
public static java.util.List<WebSocketExtension> parseExtensions(java.lang.String extensions)
WebSocketExtension
objects.
This method can be used to parse a "Sec-WebSocket-Extension" extensions.
extensions
- the string to parsejava.lang.IllegalArgumentException
- if the string cannot be parsedpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object