Public Member Functions | |
LSDMinimalSession (IoSession session) | |
LSDMinimalSession (IoSession session, byte commande, boolean unique, long legacy, long storage, long doc, byte status, int fileblocksize, int rankblock) | |
void | sessionStop () |
void | sessionFinished () |
boolean | sessionStart () |
boolean | isRunning () |
boolean | isClosed () |
void | endNewBlock () |
void | waitForAllBlocks () |
void | endedAllBlocks () |
void | setObject (Object object) |
Object | getObject () |
Object | clearObject () |
String | toString () |
void | clear () |
Public Attributes | |
IoSession | session = null |
byte | commande = LSDConstants.LSD_NULL |
boolean | unique = true |
long | legacy = LSDConstants.invalide_idx |
long | storage = LSDConstants.invalide_idx |
long | doc = LSDConstants.invalide_idx |
byte | status = LSDConstants.LSD_MSG_KOSYSTEM |
int | fileblocksize = -1 |
int | rankblock = -1 |
long | filesize = -1 |
Object | object = null |
boolean | running = false |
boolean | isClosed = true |
openlsd.network.common.message.LSDMinimalSession.LSDMinimalSession | ( | IoSession | session | ) |
Create a LSDMinimalSession as empty session from an IoSession
session |
openlsd.network.common.message.LSDMinimalSession.LSDMinimalSession | ( | IoSession | session, | |
byte | commande, | |||
boolean | unique, | |||
long | legacy, | |||
long | storage, | |||
long | doc, | |||
byte | status, | |||
int | fileblocksize, | |||
int | rankblock | |||
) |
Create a LSDMinimalSession from args but not make it running
session | the IoSession associated | |
commande | the commande | |
unique | set if this commande close the session at the end or not | |
legacy | the lid | |
storage | the sid | |
doc | the did | |
status | the current status | |
fileblocksize | the fileblock size | |
rankblock | the rank of the current block |
void openlsd.network.common.message.LSDMinimalSession.sessionStop | ( | ) |
Stop the session
Reimplemented in openlsd.network.server.LSDServerSession, and openlsd.network.client.common.LSDClientSession.
void openlsd.network.common.message.LSDMinimalSession.sessionFinished | ( | ) |
Stop the current session without closing the connection
boolean openlsd.network.common.message.LSDMinimalSession.sessionStart | ( | ) |
Start the session
Reimplemented in openlsd.network.server.LSDServerSession, and openlsd.network.client.common.LSDClientSession.
boolean openlsd.network.common.message.LSDMinimalSession.isRunning | ( | ) |
Returns the status of the current session
Returns True if the session is closed
Reimplemented in openlsd.network.server.LSDServerSession.
void openlsd.network.common.message.LSDMinimalSession.endNewBlock | ( | ) |
End the current block, and allow the next block to continue
void openlsd.network.common.message.LSDMinimalSession.waitForAllBlocks | ( | ) |
Wait that all blocks are done, so the message is completely received or sent
void openlsd.network.common.message.LSDMinimalSession.endedAllBlocks | ( | ) |
Release the lock, all blocks are considering received or sent.
void openlsd.network.common.message.LSDMinimalSession.setObject | ( | Object | object | ) |
Replace the object or New object for the session
object |
Object openlsd.network.common.message.LSDMinimalSession.getObject | ( | ) |
Get the object from the session
Object openlsd.network.common.message.LSDMinimalSession.clearObject | ( | ) |
clear the object from the session and return the object before clear.
String openlsd.network.common.message.LSDMinimalSession.toString | ( | ) |
void openlsd.network.common.message.LSDMinimalSession.clear | ( | ) |
Clear the session and make it not running but do not eraze session information neither close the session. This function make ready the object for a new action.
Reimplemented in openlsd.network.server.LSDServerSession.
IoSession openlsd.network.common.message.LSDMinimalSession.session = null |
IoSession attached with this session object
The corresponding command
boolean openlsd.network.common.message.LSDMinimalSession.unique = true |
Is this command in a "uniq" mode, that is to say when the command is over, so as the socket session. If false, the socket session is not closed.
The Storage
The Document
The Status of the command
The block size for the file
The block rank for the file
The global file size
Object openlsd.network.common.message.LSDMinimalSession.object = null |
Data part of the session: object
boolean openlsd.network.common.message.LSDMinimalSession.running = false |
For ending and ordering of received: is this session running (first to change when finishing). Allows to do some stuff between the beginning of closing and the end (was for the Mina bug that allowed two thread for the same socket to run on two different message at the same time).
boolean openlsd.network.common.message.LSDMinimalSession.isClosed = true |
For ending and ordering of received: is this session closed (last to change when finishing)