org.universAAL.lddi.zwave.exporter.Server
Class MotionServer

Package class diagram package MotionServer
java.lang.Object
  extended by org.universAAL.lddi.zwave.exporter.Server.AbstractSocketServer
      extended by org.universAAL.lddi.zwave.exporter.Server.AbstractSocketServerXSocket
          extended by org.universAAL.lddi.zwave.exporter.Server.MotionServer
All Implemented Interfaces:
Closeable, ISocketServer, ISocketServerConnectionListener, org.xsocket.connection.IConnectHandler, org.xsocket.connection.IConnectionTimeoutHandler, org.xsocket.connection.IDataHandler, org.xsocket.connection.IDisconnectHandler, org.xsocket.connection.IHandler, org.xsocket.connection.IIdleTimeoutHandler

public class MotionServer
extends AbstractSocketServerXSocket


Field Summary
 
Fields inherited from class org.universAAL.lddi.zwave.exporter.Server.AbstractSocketServerXSocket
activateConnectionLogging, srv, transferRate
 
Fields inherited from class org.universAAL.lddi.zwave.exporter.Server.AbstractSocketServer
DEFAULT_TCP_BUFFERS_SIZE, listenPort, nWorkersCPUmultiplier, nWorkersIO, protocolDecoderFactory, tcpBufferSizeIn, tcpBufferSizeOut, workerPool
 
Fields inherited from interface org.xsocket.connection.IHandler
DEFAULT_EXECUTION_MODE
 
Constructor Summary
MotionServer(ISocketServerProtocolDecoderFactory protocolFactory, int listenPort)
           
 
Method Summary
 void packetArrived(ISocketServerConnection connection, Object pckt)
          Called when a packet is fully reassembled.
 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.
 
Methods inherited from class org.universAAL.lddi.zwave.exporter.Server.AbstractSocketServerXSocket
close, getServerXSocket, getTotalReadBytes, getTotalSentBytes, getTransferRateIn, getTransferRateOut, onConnect, onConnectionTimeout, onData, onDisconnect, onIdleTimeout, packetSent, run, setActivateConnectionLogging, setIP, start
 
Methods inherited from class org.universAAL.lddi.zwave.exporter.Server.AbstractSocketServer
setPort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MotionServer

public MotionServer(ISocketServerProtocolDecoderFactory protocolFactory,
                    int listenPort)
Method Detail

packetArrived

public void packetArrived(ISocketServerConnection connection,
                          Object pckt)
Description copied from interface: ISocketServerConnectionListener
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.

socketDisconnected

public void socketDisconnected(ISocketServerConnection connection)
Description copied from interface: ISocketServerConnectionListener
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

public void socketConnected(ISocketServerConnection connection)
Description copied from interface: ISocketServerConnectionListener
Called when a new connection is established, and the handler has been setup.

Parameters:
connection - the source of the event.

socketException

public void socketException(ISocketServerConnection connection,
                            Exception ex)
Description copied from interface: ISocketServerConnectionListener
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.