public abstract class WebSocketExtension extends Object
WebSocketExtension
should be extended to define or register
WebSocketExtension.Parameter
s constants that will be used by the
application developers.Modifier and Type | Class and Description |
---|---|
static class |
WebSocketExtension.Parameter<T>
WebSocketExtension.Parameter represents an extension parameter. |
Modifier | Constructor and Description |
---|---|
protected |
WebSocketExtension()
Protected constructor to be invoked by the sub-class constructor.
|
Modifier and Type | Method and Description |
---|---|
protected <T> WebSocketExtension.Parameter<T> |
createParameter(String parameterName,
Class<T> parameterType,
EnumSet<WebSocketExtension.Parameter.Metadata> parameterMetadata)
Creates an
WebSocketExtensionParamter of the specified type. |
WebSocketExtension.Parameter<?> |
getParameter(String name)
Returns the
WebSocketExtension.Parameter defined in this
WebSoketExtension with the specified name. |
Collection<WebSocketExtension.Parameter<?>> |
getParameters()
Returns all the
WebSocketExtension.Parameter s that are defined in this
WebSocketExtension . |
Collection<WebSocketExtension.Parameter<?>> |
getParameters(WebSocketExtension.Parameter.Metadata... characteristics)
Returns
WebSocketExtension.Parameter s defined in this WebSocketExtension
that match all the specified characteristics. |
static WebSocketExtension |
getWebSocketExtension(String name)
Returns the
WebSocketExtension with the specified name. |
abstract String |
name()
Returns the name of this
WebSocketExtension . |
protected WebSocketExtension()
name
- name of the WebSocketExtensionprotected <T> WebSocketExtension.Parameter<T> createParameter(String parameterName, Class<T> parameterType, EnumSet<WebSocketExtension.Parameter.Metadata> parameterMetadata)
WebSocketExtensionParamter
of the specified type.T
- generic parameter typeparameterName
- name of the parameterparameterType
- Class object representing the parameter typeparameterMetadata
- characteristics of the parameterpublic static WebSocketExtension getWebSocketExtension(String name)
WebSocketExtension
with the specified name. A null
is returned if there are no extensions with the specified name.name
- name of the WebSocketExtensionpublic WebSocketExtension.Parameter<?> getParameter(String name)
WebSocketExtension.Parameter
defined in this
WebSoketExtension
with the specified name.name
- parameter's namepublic Collection<WebSocketExtension.Parameter<?>> getParameters()
WebSocketExtension.Parameter
s that are defined in this
WebSocketExtension
. An empty Collection is returned if there
are no WebSocketExtension.Parameter
s defined.public Collection<WebSocketExtension.Parameter<?>> getParameters(WebSocketExtension.Parameter.Metadata... characteristics)
WebSocketExtension.Parameter
s defined in this WebSocketExtension
that match all the specified characteristics. An empty Collection is
returned if none of the WebSocketExtension.Parameter
s defined in this
WebSocketExtension
match all the specified characteristics.public abstract String name()
WebSocketExtension
.Copyright © 2015. All Rights Reserved.