public class Server extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
STATIC_CONTENT_ROOT
Path to static content to be served by created Server instance.
|
| 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 contextPath,
Map<String,Object> properties,
Class<?>... configuration)
Construct new server.
|
Server(String hostName,
int port,
String contextPath,
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 (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 contextPath, Map<String,Object> properties, Class<?>... configuration)
hostName - hostName of the server.port - port of the server.contextPath - root path to the server App.properties - properties used as a parameter to (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 contextPath, Map<String,Object> properties, Set<Class<?>> configuration)
hostName - hostName of the server.port - port of the server.contextPath - root path to the server App.properties - properties used as a parameter to (java.util.Map) call.configuration - to be registered with the server. Classes annotated with ServerEndpoint, implementing ServerApplicationConfig
or extending ServerEndpointConfig
are supported.public static void main(String[] args)
public void start()
throws DeploymentException
DeploymentExceptionpublic void stop()
Copyright © 2012-2016, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.