Package ninja.websockets.jsr356
Class Jsr356ServerEndpointConfigurator
- java.lang.Object
-
- javax.websocket.server.ServerEndpointConfig.Configurator
-
- ninja.websockets.jsr356.Jsr356ServerEndpointConfigurator
-
public class Jsr356ServerEndpointConfigurator extends javax.websocket.server.ServerEndpointConfig.Configurator
Please note that this configurator will likely be shared across threads and socket handshakes. Each method may be called by multiple threads at the same time.- Author:
- jjlauer
-
-
Constructor Summary
Constructors Constructor Description Jsr356ServerEndpointConfigurator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkOrigin(String originHeaderValue)
<T> T
getEndpointInstance(Class<T> endpointClass)
List<javax.websocket.Extension>
getNegotiatedExtensions(List<javax.websocket.Extension> installed, List<javax.websocket.Extension> requested)
String
getNegotiatedSubprotocol(List<String> supported, List<String> requested)
void
modifyHandshake(javax.websocket.server.ServerEndpointConfig sec, javax.websocket.server.HandshakeRequest request, javax.websocket.HandshakeResponse response)
-
-
-
Method Detail
-
checkOrigin
public boolean checkOrigin(String originHeaderValue)
- Overrides:
checkOrigin
in classjavax.websocket.server.ServerEndpointConfig.Configurator
-
getNegotiatedSubprotocol
public String getNegotiatedSubprotocol(List<String> supported, List<String> requested)
- Overrides:
getNegotiatedSubprotocol
in classjavax.websocket.server.ServerEndpointConfig.Configurator
-
getNegotiatedExtensions
public List<javax.websocket.Extension> getNegotiatedExtensions(List<javax.websocket.Extension> installed, List<javax.websocket.Extension> requested)
- Overrides:
getNegotiatedExtensions
in classjavax.websocket.server.ServerEndpointConfig.Configurator
-
modifyHandshake
public void modifyHandshake(javax.websocket.server.ServerEndpointConfig sec, javax.websocket.server.HandshakeRequest request, javax.websocket.HandshakeResponse response)
- Overrides:
modifyHandshake
in classjavax.websocket.server.ServerEndpointConfig.Configurator
-
getEndpointInstance
public <T> T getEndpointInstance(Class<T> endpointClass) throws InstantiationException
- Overrides:
getEndpointInstance
in classjavax.websocket.server.ServerEndpointConfig.Configurator
- Throws:
InstantiationException
-
-