openlsd.network.client.get
Class LSDClientGetSessionHandler
java.lang.Object
org.apache.mina.common.IoHandlerAdapter
openlsd.network.client.common.LSDClientCommonSessionHandler
openlsd.network.client.get.LSDClientGetSessionHandler
- All Implemented Interfaces:
- org.apache.mina.common.IoHandler
- Direct Known Subclasses:
- LSDPoolClientGetSessionHandler, LSDWebClientGetSessionHandler
public class LSDClientGetSessionHandler
- extends LSDClientCommonSessionHandler
This LSDClientGetSessionHandler is the main class for the client
part (get). This class can be extended to adjust specific
needs for application interface (messageGetBlock).
- Author:
- Frederic Bregier LGPL
Method Summary |
protected boolean |
messageClear(org.apache.mina.common.IoSession session,
java.lang.Object arg1)
Clear the message sent from memory. |
protected void |
messageGetBlock(org.apache.mina.common.IoSession session,
LSDClientSession ls,
byte[] bytes)
Exemple of messageGetBlock extended to array of byte and FileChannel. |
protected void |
messageRun(org.apache.mina.common.IoSession session,
LSDMsgAnswear lma)
When a message is received, call the messageGet
according to the kind of message. |
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 |
LSDClientGetSessionHandler
public LSDClientGetSessionHandler()
messageRun
protected void messageRun(org.apache.mina.common.IoSession session,
LSDMsgAnswear lma)
- When a message is received, call the messageGet
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)
messageGetBlock
protected void messageGetBlock(org.apache.mina.common.IoSession session,
LSDClientSession ls,
byte[] bytes)
- Exemple of messageGetBlock extended to array of byte and FileChannel.
This function stores the byte array arguments as a new block
receive for the document.
This function by default adds the current block of bytes
to the bytesfile variable of the session or to the filechannel.
This function should be extended if the application needs
to make something by block (example http answear).
- 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)