com.glines.socketio.server
Interface SocketIOOutbound

All Known Subinterfaces:
SocketIOSession.SessionTransportHandler
All Known Implementing Classes:
JSONPPollingTransport.XHRPollingSessionHelper, XHRPollingTransport.XHRPollingSessionHelper, XHRTransport.XHRSessionHelper

public interface SocketIOOutbound


Method Summary
 void close()
          Initiate an orderly close of the connection.
 void disconnect()
          Terminate the connection.
 ConnectionState getConnectionState()
           
 void sendMessage(int messageType, String message)
          Send a message.
 void sendMessage(String message)
          Send a message to the client.
 

Method Detail

disconnect

void disconnect()
Terminate the connection. This method may return before the connection disconnect completes. The onDisconnect() method of the associated SocketInbound will be called when the disconnect is completed. The onDisconnect() method may be called during the invocation of this method.


close

void close()
Initiate an orderly close of the connection. The state will be changed to CLOSING so no new messages can be sent, but messages may still arrive until the distant end has acknowledged the close.


getConnectionState

ConnectionState getConnectionState()

sendMessage

void sendMessage(String message)
                 throws SocketIOException
Send a message to the client. This method will block if the message will not fit in the outbound buffer. If the socket is closed, becomes closed, or times out, while trying to send the message, the SocketClosedException will be thrown.

Parameters:
message - The message to send
Throws:
SocketIOException

sendMessage

void sendMessage(int messageType,
                 String message)
                 throws SocketIOException
Send a message.

Parameters:
messageType -
message -
Throws:
IllegalStateException - if the socket is not CONNECTED.
SocketIOException


Copyright © 2010-2011. All Rights Reserved.