com.sun.grizzly.websockets
Interface WebSocket
- All Known Implementing Classes:
- BaseServerWebSocket, BaseWebSocket, ClientWebSocket, NioClientWebSocket
public interface WebSocket
onConnect
void onConnect()
throws IOException
- Throws:
IOException
onMessage
void onMessage(DataFrame frame)
throws IOException
- Throws:
IOException
onClose
void onClose()
throws IOException
- Throws:
IOException
add
boolean add(WebSocketListener listener)
remove
boolean remove(WebSocketListener listener)
send
void send(String data)
throws IOException
- Write the data to the socket. This text will be converted to a UTF-8 encoded byte[] prior to sending.
- Parameters:
data -
- Throws:
IOException
send
void send(DataFrame data)
throws IOException
- Throws:
IOException
close
void close()
throws IOException
- Throws:
IOException
isConnected
boolean isConnected()
Copyright © 2011 Oracle Corpration. All Rights Reserved.