public class ServerEndpointRegistration extends ServerEndpointConfig.Configurator implements ServerEndpointConfig, BeanFactoryAware
ServerEndpointConfig for use in
 Spring applications. A ServerEndpointRegistration bean is detected by
 ServerEndpointExporter and registered with a Java WebSocket runtime at startup.
 Class constructors accept a singleton Endpoint instance
 or an Endpoint specified by type Class. When specified by type, the endpoint
 will be instantiated and initialized through the Spring ApplicationContext before
 each client WebSocket connection.
 
This class also extends
 ServerEndpointConfig.Configurator to make it easier to
 override methods for customizing the handshake process.
ServerEndpointExporterServerEndpointConfig.Builder, ServerEndpointConfig.Configurator| Constructor and Description | 
|---|
ServerEndpointRegistration(String path,
                          Class<? extends Endpoint> endpointClass)
Create a new  
ServerEndpointRegistration instance from an
 javax.websocket.Endpoint class. | 
ServerEndpointRegistration(String path,
                          Endpoint endpoint)
Create a new  
ServerEndpointRegistration instance from an
 javax.websocket.Endpoint instance. | 
public ServerEndpointRegistration(String path, Class<? extends Endpoint> endpointClass)
ServerEndpointRegistration instance from an
 javax.websocket.Endpoint class.path - the endpoint pathendpointClass - the endpoint classpublic ServerEndpointRegistration(String path, Endpoint endpoint)
ServerEndpointRegistration instance from an
 javax.websocket.Endpoint instance.path - the endpoint pathendpoint - the endpoint instancepublic String getPath()
getPath in interface ServerEndpointConfigpublic Class<? extends Endpoint> getEndpointClass()
getEndpointClass in interface ServerEndpointConfigpublic Endpoint getEndpoint()
public List<String> getSubprotocols()
getSubprotocols in interface ServerEndpointConfigpublic List<Extension> getExtensions()
getExtensions in interface ServerEndpointConfigpublic Map<String,Object> getUserProperties()
getUserProperties in interface EndpointConfigpublic List<Class<? extends Encoder>> getEncoders()
getEncoders in interface EndpointConfigpublic List<Class<? extends Decoder>> getDecoders()
getDecoders in interface EndpointConfigpublic ServerEndpointConfig.Configurator getConfigurator()
getConfigurator in interface ServerEndpointConfigpublic void setBeanFactory(BeanFactory beanFactory)
BeanFactoryAwareInvoked after the population of normal bean properties
 but before an initialization callback such as
 InitializingBean.afterPropertiesSet() or a custom init-method.
setBeanFactory in interface BeanFactoryAwarebeanFactory - owning BeanFactory (never null).
 The bean can immediately call methods on the factory.BeanInitializationExceptionpublic final <T> T getEndpointInstance(Class<T> clazz) throws InstantiationException
getEndpointInstance in class ServerEndpointConfig.ConfiguratorInstantiationExceptionpublic void modifyHandshake(ServerEndpointConfig sec, HandshakeRequest request, HandshakeResponse response)
modifyHandshake in class ServerEndpointConfig.Configuratorpublic boolean checkOrigin(String originHeaderValue)
checkOrigin in class ServerEndpointConfig.Configuratorpublic String getNegotiatedSubprotocol(List<String> supported, List<String> requested)
getNegotiatedSubprotocol in class ServerEndpointConfig.Configuratorpublic List<Extension> getNegotiatedExtensions(List<Extension> installed, List<Extension> requested)
getNegotiatedExtensions in class ServerEndpointConfig.Configurator