com.sun.grizzly.websockets
Class BaseWebSocket
java.lang.Object
com.sun.grizzly.websockets.BaseWebSocket
- All Implemented Interfaces:
- WebSocket
- Direct Known Subclasses:
- BaseServerWebSocket, ClientWebSocket, NioClientWebSocket
public class BaseWebSocket
- extends Object
- implements WebSocket
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final Logger logger
BaseWebSocket
public BaseWebSocket(WebSocketListener... listeners)
getNetworkHandler
public NetworkHandler getNetworkHandler()
setNetworkHandler
public void setNetworkHandler(NetworkHandler handler)
getListeners
public List<WebSocketListener> getListeners()
isConnected
public boolean isConnected()
- Specified by:
isConnected in interface WebSocket
add
public final boolean add(WebSocketListener listener)
- Specified by:
add in interface WebSocket
close
public void close()
throws IOException
- Specified by:
close in interface WebSocket
- Throws:
IOException
onClose
public void onClose()
throws IOException
- Specified by:
onClose in interface WebSocket
- Throws:
IOException
remove
public final boolean remove(WebSocketListener listener)
- Specified by:
remove in interface WebSocket
send
public void send(String data)
throws IOException
- Description copied from interface:
WebSocket
- Write the data to the socket. This text will be converted to a UTF-8 encoded byte[] prior to sending.
- Specified by:
send in interface WebSocket
- Throws:
IOException
send
public void send(DataFrame frame)
throws IOException
- Specified by:
send in interface WebSocket
- Throws:
IOException
onConnect
public void onConnect()
throws IOException
- Specified by:
onConnect in interface WebSocket
- Throws:
IOException
onMessage
public void onMessage(DataFrame frame)
throws IOException
- Specified by:
onMessage in interface WebSocket
- Throws:
IOException
Copyright © 2011 Oracle Corpration. All Rights Reserved.