|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.tyrus.DefaultEndpointConfiguration
org.glassfish.tyrus.server.DefaultServerEndpointConfiguration
public class DefaultServerEndpointConfiguration
Provides the default ServerEndpointConfiguration.
| Nested Class Summary | |
|---|---|
static class |
DefaultServerEndpointConfiguration.Builder
Builder class used to build the DefaultServerEndpointConfiguration. |
| Field Summary |
|---|
| Fields inherited from class org.glassfish.tyrus.DefaultEndpointConfiguration |
|---|
extensions, subProtocols, uri |
| Constructor Summary | |
|---|---|
protected |
DefaultServerEndpointConfiguration(String uri,
List<Encoder> encoders,
List<Decoder> decoders,
List<String> subprotocols,
List<String> extensions,
List<String> origins)
Creates new configuration for Endpoint which is used on the server side. |
| Method Summary | |
|---|---|
boolean |
checkOrigin(String originHeaderValue)
Check the value of the Origin header (See definition) the client passed during the opening handshake. |
List<String> |
getNegotiatedExtensions(List<String> requestedExtensions)
http://java.net/jira/browse/WEBSOCKET_SPEC-45 Return the ordered list of extensions that this server will support given the requested extension list passed in. |
String |
getNegotiatedSubprotocol(List<String> requestedSubprotocols)
Return the subprotocol this server endpoint has chosen from the requested list supplied by a client who wishes to connect, or none if there wasn't one this server endpoint liked. |
boolean |
matchesURI(URI uri)
Answers whether the current configuration matches the given URI. |
void |
modifyHandshake(HandshakeRequest request,
HandshakeResponse response)
Called by the container after it has formulated a handshake response resulting from a well-formed handshake request. |
| Methods inherited from class org.glassfish.tyrus.DefaultEndpointConfiguration |
|---|
getDecoders, getEncoders, getPath |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.net.websocket.EndpointConfiguration |
|---|
getDecoders, getEncoders, getPath |
| Constructor Detail |
|---|
protected DefaultServerEndpointConfiguration(String uri,
List<Encoder> encoders,
List<Decoder> decoders,
List<String> subprotocols,
List<String> extensions,
List<String> origins)
Endpoint which is used on the server side.
encoders - message encoders.decoders - message decoders.subprotocols - supported sub - protocols.extensions - supported extensions.origins - accepted origins.| Method Detail |
|---|
public String getNegotiatedSubprotocol(List<String> requestedSubprotocols)
ServerEndpointConfiguration
getNegotiatedSubprotocol in interface ServerEndpointConfigurationrequestedSubprotocols - the requested subprotocols.
public List<String> getNegotiatedExtensions(List<String> requestedExtensions)
ServerEndpointConfiguration
getNegotiatedExtensions in interface ServerEndpointConfigurationrequestedExtensions - the requested extentions, in order.
public boolean checkOrigin(String originHeaderValue)
ServerEndpointConfiguration
checkOrigin in interface ServerEndpointConfigurationoriginHeaderValue - the value of the origin header.
public boolean matchesURI(URI uri)
ServerEndpointConfiguration
matchesURI in interface ServerEndpointConfigurationuri - the uri of the incoming handshake.
public void modifyHandshake(HandshakeRequest request,
HandshakeResponse response)
ServerEndpointConfiguration
modifyHandshake in interface ServerEndpointConfigurationrequest - the opening handshake request.response - the proposed opening handshake response
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||