com.sun.grizzly.websockets
Interface WebSocket

All Known Implementing Classes:
BaseServerWebSocket, BaseWebSocket, ClientWebSocket, NioClientWebSocket

public interface WebSocket


Method Summary
 boolean add(WebSocketListener listener)
           
 void close()
           
 boolean isConnected()
           
 void onClose()
           
 void onConnect()
           
 void onMessage(DataFrame frame)
           
 boolean remove(WebSocketListener listener)
           
 void send(DataFrame data)
           
 void send(String data)
          Write the data to the socket.
 

Method Detail

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.