org.glassfish.grizzly.websockets
Class WebSocketServer
java.lang.Object
org.glassfish.grizzly.websockets.WebSocketServer
public class WebSocketServer
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebSocketServer
protected WebSocketServer()
- Empty constructor, which doesn't do any network initialization.
WebSocketServer
public WebSocketServer(int port)
- Deprecated. please use
createServer(int).
- Parameters:
port - the network port to which this listener will bind.
WebSocketServer
protected WebSocketServer(String host,
PortRange portRange)
- Parameters:
host - the network port to which this listener will bind.range - port range to attempt to bind to.
createSimpleServer
public static WebSocketServer createSimpleServer(int port)
- Deprecated. please use
createServer(int).
- Parameters:
port - the network port to which this listener will bind.
- Returns:
- a
WebSocketServer configured to listen to requests on NetworkListener.DEFAULT_NETWORK_HOST:port.
createServer
public static WebSocketServer createServer(int port)
- Parameters:
port - the network port to which this listener will bind.
- Returns:
- a
WebSocketServer configured to listen to requests on NetworkListener.DEFAULT_NETWORK_HOST:port.
createServer
public static WebSocketServer createServer(PortRange range)
- Parameters:
range - port range to attempt to bind to.
- Returns:
- a
WebSocketServer configured to listen to requests
on NetworkListener.DEFAULT_NETWORK_HOST:[port-range].
createServer
public static WebSocketServer createServer(SocketAddress socketAddress)
- Parameters:
socketAddress - the endpoint address to which this listener will bind.
- Returns:
- a
WebSocketServer configured to listen to requests
on socketAddress.
createServer
public static WebSocketServer createServer(String host,
int port)
- Parameters:
host - the network port to which this listener will bind.port - the network port to which this listener will bind.
- Returns:
- a
WebSocketServer configured to listen to requests
on host:port.
createServer
public static WebSocketServer createServer(String host,
PortRange range)
- Parameters:
host - the network port to which this listener will bind.range - port range to attempt to bind to.
- Returns:
- a
WebSocketServer configured to listen to requests
on host:[port-range].
start
public void start()
throws IOException
- Throws:
IOException
stop
public void stop()
register
public void register(String name,
WebSocketApplication application)
Copyright © 2012 Oracle Corporation. All Rights Reserved.