|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.websocket.server.ServerEndpointConfigurator
public abstract class ServerEndpointConfigurator
The ServerEndpointConfigurator interface may be implemented by developers who want to provide custom configuration algorithms, such as intercepting the opening handshake, or providing arbitrary methods and algorithms that can be accessed from each endpoint instance configured with this configurator. The implementation must provide a platform default configurator loading using the service loader.
| Constructor Summary | |
|---|---|
ServerEndpointConfigurator()
|
|
| Method Summary | |
|---|---|
boolean |
checkOrigin(String originHeaderValue)
Check the value of the Origin header (See Origin Header) the client passed during the opening handshake. |
List<Extension> |
getNegotiatedExtensions(List<Extension> installed,
List<Extension> requested)
Return the ordered list of extensions that t server endpoint will support given the requested extension list passed in, the empty list if none. |
String |
getNegotiatedSubprotocol(List<String> supported,
List<String> requested)
Return the subprotocol the 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(String path,
URI requestUri,
Map<String,String> templateExpansion)
Answers whether the incoming handshake request uri matches the path of the server endpoint. |
void |
modifyHandshake(ServerEndpointConfiguration sec,
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServerEndpointConfigurator()
| Method Detail |
|---|
public String getNegotiatedSubprotocol(List<String> supported,
List<String> requested)
requested - the requested subprotocols from the client endpointsupported - the subprotocols supported by the server endpoint
public List<Extension> getNegotiatedExtensions(List<Extension> installed,
List<Extension> requested)
installed - the installed extensions on the implementation.requested - the requested extensions, in the order they were
requested by the client
public boolean checkOrigin(String originHeaderValue)
originHeaderValue - the value of the origin header passed
by the client.
public boolean matchesURI(String path,
URI requestUri,
Map<String,String> templateExpansion)
templateExpansion - an empty Map to hold URI-template expansion
names and values.path - the path (URI or URI template) of the server endpointrequestUri - the uri of the incoming handshake.
public void modifyHandshake(ServerEndpointConfiguration sec,
HandshakeRequest request,
HandshakeResponse response)
request - 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 | |||||||||