org.universAAL.lddi.zwave.exporter.Server
Interface ISocketServerConnectionListener

Package class diagram package ISocketServerConnectionListener
All Known Implementing Classes:
AbstractSocketServerXSocket, MotionServer

public interface ISocketServerConnectionListener

Callback interface used to receive events from the ISocketServerConnection.

Version:
$Rev: 5339 $ $Date: 2012-09-25 17:17:28 +0200 (mar, 25 sep 2012) $
Author:
fraperod

Method Summary
 void packetArrived(ISocketServerConnection connection, Object pckt)
          Called when a packet is fully reassembled.
 void packetSent(ISocketServerConnection connection, int size)
          Called after a packet has been sent.
 void socketConnected(ISocketServerConnection connection)
          Called when a new connection is established, and the handler has been setup.
 void socketDisconnected(ISocketServerConnection connection)
          Called when the read operation reaches the end of stream.
 void socketException(ISocketServerConnection connection, Exception ex)
          Called when some error occurs while reading or writing to the socket.
 

Method Detail

packetArrived

void packetArrived(ISocketServerConnection connection,
                   Object pckt)
Called when a packet is fully reassembled.

Parameters:
connection - the source of the event.
pckt - the reassembled packet. The type of the object is determined by the ISocketSeverProtocolDecoder class used.

packetSent

void packetSent(ISocketServerConnection connection,
                int size)
Called after a packet has been sent. The packet is sent using writeToConnection

Parameters:
connection - The connection which sent the packet
size - The size of the packet sent

socketDisconnected

void socketDisconnected(ISocketServerConnection connection)
Called when the read operation reaches the end of stream. This means that the socket was closed.

Parameters:
connection - the source of the event.

socketConnected

void socketConnected(ISocketServerConnection connection)
Called when a new connection is established, and the handler has been setup.

Parameters:
connection - the source of the event.

socketException

void socketException(ISocketServerConnection connection,
                     Exception ex)
Called when some error occurs while reading or writing to the socket.

Parameters:
connection - the source of the event.
ex - the exception representing the error.


Copyright © 2014 universAAL Consortium. All Rights Reserved.