openlsd.multiple.ophandler.extension.LSDPoolClientPutSessionHandler Class Reference

Inheritance diagram for openlsd.multiple.ophandler.extension.LSDPoolClientPutSessionHandler:

Inheritance graph
[legend]
Collaboration diagram for openlsd.multiple.ophandler.extension.LSDPoolClientPutSessionHandler:

Collaboration graph
[legend]

List of all members.


Detailed Description

Class to handle Put Handler in Pool context and adding forward function (Get->Put)
Author:
Frederic BREGIER LGPL 2007

Public Member Functions

void exceptionCaught (IoSession session, Throwable arg1)
void sessionIdle (IoSession session, IdleStatus arg1) throws Exception
void sessionClosed (IoSession session) throws Exception
void messageReceived (IoSession session, Object arg1) throws Exception
void messageSent (IoSession session, Object arg1) throws Exception

Protected Member Functions

void messagePut (IoSession session, LSDMsgAnswear lma)
void messageRun (IoSession session, LSDMsgAnswear lma)
byte[] messageNewBlock (IoSession session, LSDClientSession ls)
boolean messageClear (IoSession session, Object arg1)
void sessionFinished (IoSession session, byte status)

Member Function Documentation

void openlsd.multiple.ophandler.extension.LSDPoolClientPutSessionHandler.messagePut ( IoSession  session,
LSDMsgAnswear  lma 
) [protected]

This function is protected but do not call the public function messageNewBlock since in this implementation this is a forward support function.

This function does not call the messageNewBlock and is only intend to validate one writeForward call from LSDPoolClientPut. It does nothing except on final message (in error or in OK).

Parameters:
session 
lma 

Reimplemented from openlsd.network.client.put.LSDClientPutSessionHandler.

void openlsd.network.client.put.LSDClientPutSessionHandler.messageRun ( IoSession  session,
LSDMsgAnswear  lma 
) [protected, virtual, inherited]

When a message is received, call the messagePut according to the kind of message.

See also:
openlsd.network.client.common.LSDClientCommonSessionHandler.messageRun(org.apache.mina.common.IoSession, openlsd.network.common.message.LSDMsgAnswear)

Implements openlsd.network.client.common.LSDClientCommonSessionHandler.

byte [] openlsd.network.client.put.LSDClientPutSessionHandler.messageNewBlock ( IoSession  session,
LSDClientSession  ls 
) [protected, inherited]

This function by default gets the next block of bytes from the array of byte or from the FileChannel.

This function should be extended if the application needs to make something by block (example http put).

Parameters:
session 
ls 
Returns:
the array of byte of the block

boolean openlsd.network.client.put.LSDClientPutSessionHandler.messageClear ( IoSession  session,
Object  arg1 
) [protected, virtual, inherited]

Clear the message sent from memory.

See also:
openlsd.network.client.common.LSDClientCommonSessionHandler.messageClear(org.apache.mina.common.IoSession, java.lang.Object)

Implements openlsd.network.client.common.LSDClientCommonSessionHandler.

void openlsd.network.client.common.LSDClientCommonSessionHandler.exceptionCaught ( IoSession  session,
Throwable  arg1 
) [inherited]

In case of exception, if the session is present, free the lock such that the main call is released.

See also:
org.apache.mina.common.IoHandlerAdapter.exceptionCaught(org.apache.mina.common.IoSession, java.lang.Throwable)

void openlsd.network.client.common.LSDClientCommonSessionHandler.sessionIdle ( IoSession  session,
IdleStatus  arg1 
) throws Exception [inherited]

In case of idle, if the session is present, free the lock such that the main call is released.

See also:
org.apache.mina.common.IoHandlerAdapter.sessionIdle(org.apache.mina.common.IoSession, org.apache.mina.common.IdleStatus)

void openlsd.network.client.common.LSDClientCommonSessionHandler.sessionClosed ( IoSession  session  )  throws Exception [inherited]

When the session is closed, free the session associated.

See also:
org.apache.mina.common.IoHandlerAdapter.sessionClosed(org.apache.mina.common.IoSession)

void openlsd.network.client.common.LSDClientCommonSessionHandler.messageReceived ( IoSession  session,
Object  arg1 
) throws Exception [inherited]

When a message is received, call the messageRun to run a specific task according to the kind of message.

See also:
org.apache.mina.common.IoHandlerAdapter.messageReceived(org.apache.mina.common.IoSession, java.lang.Object)

void openlsd.network.client.common.LSDClientCommonSessionHandler.messageSent ( IoSession  session,
Object  arg1 
) throws Exception [inherited]

Clear the message sent from memory. Call the function messageClear to extend to adapt to the kind of message to clear.

WARNING : one access to LSDClient from network.client.example to remove when ready to production.

Parameters:
session 
arg1 
See also:
org.apache.mina.common.IoHandlerAdapter.messageSent(org.apache.mina.common.IoSession, java.lang.Object)

void openlsd.network.client.common.LSDClientCommonSessionHandler.sessionFinished ( IoSession  session,
byte  status 
) [protected, inherited]

Finish the current session by simply assign the status and releasing the possible lock.

Parameters:
session 
status 


The documentation for this class was generated from the following file: