openlsd.network.client.info
Class LSDClientInfoSessionHandler

java.lang.Object
  extended by org.apache.mina.common.IoHandlerAdapter
      extended by openlsd.network.client.common.LSDClientCommonSessionHandler
          extended by openlsd.network.client.info.LSDClientInfoSessionHandler
All Implemented Interfaces:
org.apache.mina.common.IoHandler
Direct Known Subclasses:
LSDExtClientInfoSessionHandler

public class LSDClientInfoSessionHandler
extends LSDClientCommonSessionHandler

This LSDClientInfoSessionHandler is the main class for the client part (information).

Author:
Frederic Bregier LGPL

Constructor Summary
LSDClientInfoSessionHandler()
           
 
Method Summary
protected  boolean messageClear(org.apache.mina.common.IoSession session, java.lang.Object arg1)
          Clear the message sent from memory.
protected  void messageGetAExist(org.apache.mina.common.IoSession session, LSDClientSession ls, byte[] bytes)
          This function add in the queue if one triplet is in KO.
protected  void messageGetAExistMD5(org.apache.mina.common.IoSession session, LSDClientSession ls, byte[] bytes)
          This function add in the queue if one triplet + md5 is in KO.
protected  void messageGetList(org.apache.mina.common.IoSession session, LSDClientSession ls, byte[] bytes)
          This function by default do nothing with the block as it cannot be stored in an array (capacity limited).
protected  void messageGetListMD5(org.apache.mina.common.IoSession session, LSDClientSession ls, byte[] bytes)
          This function by default do nothing with the block as it cannot be stored in an array (capacity limited).
protected  void messageRun(org.apache.mina.common.IoSession session, LSDMsgAnswear lma)
          When a message is received, call the message function according to the kind of message.
 
Methods inherited from class openlsd.network.client.common.LSDClientCommonSessionHandler
exceptionCaught, messageReceived, messageSent, sessionClosed, sessionFinished, sessionIdle
 
Methods inherited from class org.apache.mina.common.IoHandlerAdapter
sessionCreated, sessionOpened
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LSDClientInfoSessionHandler

public LSDClientInfoSessionHandler()
Method Detail

messageRun

protected void messageRun(org.apache.mina.common.IoSession session,
                          LSDMsgAnswear lma)
When a message is received, call the message function according to the kind of message.

Specified by:
messageRun in class LSDClientCommonSessionHandler
lma - Message from server
See Also:
LSDClientCommonSessionHandler.messageRun(org.apache.mina.common.IoSession, openlsd.network.common.message.LSDMsgAnswear)

messageGetList

protected void messageGetList(org.apache.mina.common.IoSession session,
                              LSDClientSession ls,
                              byte[] bytes)
This function by default do nothing with the block as it cannot be stored in an array (capacity limited). This function must be extended if the application needs to make something by block (example check DB).

Parameters:
session -
ls -
bytes -

messageGetListMD5

protected void messageGetListMD5(org.apache.mina.common.IoSession session,
                                 LSDClientSession ls,
                                 byte[] bytes)
This function by default do nothing with the block as it cannot be stored in an array (capacity limited). This function must be extended if the application needs to make something by block (example check DB).

Parameters:
session -
ls -
bytes -

messageGetAExist

protected void messageGetAExist(org.apache.mina.common.IoSession session,
                                LSDClientSession ls,
                                byte[] bytes)
This function add in the queue if one triplet is in KO. Only false positive are received.

Parameters:
session -
ls -
bytes -

messageGetAExistMD5

protected void messageGetAExistMD5(org.apache.mina.common.IoSession session,
                                   LSDClientSession ls,
                                   byte[] bytes)
This function add in the queue if one triplet + md5 is in KO. Only false positive are received.

Parameters:
session -
ls -
bytes -

messageClear

protected boolean messageClear(org.apache.mina.common.IoSession session,
                               java.lang.Object arg1)
Clear the message sent from memory.

Specified by:
messageClear in class LSDClientCommonSessionHandler
Returns:
True if the message is correctly found, else False.
See Also:
LSDClientCommonSessionHandler.messageClear(org.apache.mina.common.IoSession, java.lang.Object)