org.glassfish.grizzly.websockets
Class ClientWebSocket
java.lang.Object
org.glassfish.grizzly.websockets.BaseWebSocket
org.glassfish.grizzly.websockets.ClientWebSocket
- All Implemented Interfaces:
- WebSocket
public class ClientWebSocket
- extends BaseWebSocket
| Methods inherited from class org.glassfish.grizzly.websockets.BaseWebSocket |
add, close, close, close, getListeners, isConnected, onConnect, onMessage, onMessage, onPing, remove, send, send |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClientWebSocket
public ClientWebSocket(String uri,
WebSocketListener... listeners)
throws URISyntaxException
- Throws:
URISyntaxException
ClientWebSocket
public ClientWebSocket(URI uri,
WebSocketListener... listeners)
onClose
public void onClose(DataFrame frame)
- Specified by:
onClose in interface WebSocket- Overrides:
onClose in class BaseWebSocket
getAddress
public URI getAddress()
execute
public void execute(Runnable runnable)
connect
public WebSocket connect()
- Returns:
- this on successful connection
connect
public WebSocket connect(long timeout)
- Parameters:
timeout - number of seconds to timeout trying to connect
- Returns:
- this on successful connection
Copyright © 2011 Oracle Corpration. All Rights Reserved.