public class Server extends Object
| Constructor and Description |
|---|
Server(Class<?>... configuration)
Create new server instance.
|
Server(Map<String,Object> properties,
Class<?>... configuration)
Create new server instance.
|
Server(String hostName,
int port,
String rootPath,
Map<String,Object> properties,
Class<?>... configuration)
Construct new server.
|
Server(String hostName,
int port,
String rootPath,
Map<String,Object> properties,
Set<Class<?>> configuration)
Construct new server.
|
public Server(Class<?>... configuration)
configuration - to be registered with the server. Classes annotated with
ServerEndpoint,
implementing ServerApplicationConfig
or extending ServerEndpointConfig are supported.public Server(Map<String,Object> properties, Class<?>... configuration)
properties - properties used as a parameter to ServerContainerFactory.createServerContainer(java.util.Map) call.configuration - to be registered with the server. Classes annotated with
ServerEndpoint,
implementing ServerApplicationConfig
or extending ServerEndpointConfig are supported.public Server(String hostName, int port, String rootPath, Map<String,Object> properties, Class<?>... configuration)
hostName - hostName of the server.port - port of the server.rootPath - root path to the server App.properties - properties used as a parameter to ServerContainerFactory.createServerContainer(java.util.Map) call.configuration - to be registered with the server. Classes annotated with
ServerEndpoint,
implementing ServerApplicationConfig
or extending ServerEndpointConfig are supported.public Server(String hostName, int port, String rootPath, Map<String,Object> properties, Set<Class<?>> configuration)
hostName - hostName of the server.port - port of the server.rootPath - root path to the server App.properties - properties used as a parameter to ServerContainerFactory.createServerContainer(java.util.Map) call.configuration - to be registered with the server. Classes annotated with
ServerEndpoint,
implementing ServerApplicationConfig
or extending ServerEndpointConfig are supported.public void start()
throws javax.websocket.DeploymentException
javax.websocket.DeploymentExceptionpublic void stop()
public static void main(String[] args)
Copyright © 2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.