public class Server extends Object
| Constructor and Description |
|---|
Server(Class<?>... configuration)
Create new server instance.
|
Server(String hostName,
int port,
String rootPath,
Class<?>... configuration)
Construct new server.
|
Server(String hostName,
int port,
String rootPath,
Set<Class<?>> configuration)
Construct new server.
|
| Modifier and Type | Method and Description |
|---|---|
TyrusServerContainer |
getServerContainer() |
static void |
main(String[] args) |
void |
start()
Start the server.
|
void |
stop()
Stop the 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(String hostName, int port, String rootPath, Class<?>... configuration)
hostName - hostName of the server.port - port of the server.rootPath - root path to the server App.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, Set<Class<?>> configuration)
hostName - hostName of the server.port - port of the server.rootPath - root path to the server App.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)
public TyrusServerContainer getServerContainer()
Copyright © 2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.