public class WebSocketExtension extends Object
WebSocket Extension HTTP headers may include parameters and follow RFC 2616 Section 4.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(String name)
Create a WebSocketExtension with the given name.
|
WebSocketExtension(String name,
Map<String,String> parameters)
Create a WebSocketExtension with the given name and parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getName() |
Map<String,String> |
getParameters() |
int |
hashCode() |
static List<WebSocketExtension> |
parseExtensions(String extensions)
Parse the given, comma-separated string into a list of
WebSocketExtension objects. |
String |
toString() |
public WebSocketExtension(String name)
name
- the name of the extensionpublic String getName()
public Map<String,String> getParameters()
null
public static List<WebSocketExtension> parseExtensions(String extensions)
WebSocketExtension
objects.
This method can be used to parse a "Sec-WebSocket-Extension" extensions.
extensions
- the string to parseIllegalArgumentException
- if the string cannot be parsed