Public Member Functions | |
LSDPoolClientPut (LSDClientPutSessionHandler lscshext, String Hostname, int ServerPort, boolean immediate, LSDPoolConnection poolConnection) | |
LSDPoolClientPut (String Hostname, int ServerPort, boolean immediate, LSDPoolConnection poolConnection) | |
LSDPoolClientPut (LSDClientPutSessionHandler lscshext, String Hostname, int ServerPort, boolean ServerCompressed, boolean ClientCompressed, boolean immediate, LSDPoolConnection poolConnection) | |
LSDPoolClientPut (String Hostname, int ServerPort, boolean ServerCompressed, boolean ClientCompressed, boolean immediate, LSDPoolConnection poolConnection) | |
void | close () |
int | prepareForward (boolean unique, long legacy, long storage, long document) |
int | prepareNoAckForward (boolean unique, long legacy, long storage, long document) |
int | finalizeForward () |
boolean | writeForward (byte[] bytes) |
int | putDataFromObject (boolean unique, long legacy, long storage, long document, Object object) |
int | putNoAckDataFromObject (boolean unique, long legacy, long storage, long document, Object object) |
int | putFile (boolean unique, long legacy, long storage, long document, String filepath) |
void | lock () |
void | connect (boolean immediate, boolean keepalived) |
boolean | connectionJoin () |
boolean | sessionReconnect () |
boolean | isConnected () |
void | clear () |
Object | getObject () |
void | setObject (Object object) |
Object | clearObject () |
void | realClose () |
int | getStatus () |
void | initShared () |
void | unlock () |
String | toString () |
Static Public Member Functions | |
static void | initClient () |
static void | endClient () |
static void | endClient (boolean toexit) |
static boolean | isSessionOK (IoSession session) |
Public Attributes | |
boolean | isForward = false |
String | md5 = null |
long | size = 0 |
String | hostname = "localhost" |
int | serverPort = 8080 |
boolean | serverCompressed = false |
boolean | clientCompressed = false |
long | idip = LSDConstants.invalide_idx |
IoSession | session = null |
SocketConnector | connector = null |
LSDClientSession | ls = null |
LSDClientCommonSessionHandler | lscsh = null |
ExecutorService | executorChainService = null |
LSDPoolConnectionAbstract | poolConnection = null |
Protected Member Functions | |
LSDClientCommonSessionHandler | createSessionHandler () |
Private Member Functions | |
void | prepare (boolean unique, long legacy, long storage, long document) |
void | prepareNoAck (boolean unique, long legacy, long storage, long document) |
openlsd.multiple.ophandler.extension.LSDPoolClientPut.LSDPoolClientPut | ( | LSDClientPutSessionHandler | lscshext, | |
String | Hostname, | |||
int | ServerPort, | |||
boolean | immediate, | |||
LSDPoolConnection | poolConnection | |||
) |
lscshext | ||
Hostname | ||
ServerPort | ||
immediate | ||
poolConnection |
openlsd.multiple.ophandler.extension.LSDPoolClientPut.LSDPoolClientPut | ( | String | Hostname, | |
int | ServerPort, | |||
boolean | immediate, | |||
LSDPoolConnection | poolConnection | |||
) |
Hostname | ||
ServerPort | ||
immediate | ||
poolConnection |
openlsd.multiple.ophandler.extension.LSDPoolClientPut.LSDPoolClientPut | ( | LSDClientPutSessionHandler | lscshext, | |
String | Hostname, | |||
int | ServerPort, | |||
boolean | ServerCompressed, | |||
boolean | ClientCompressed, | |||
boolean | immediate, | |||
LSDPoolConnection | poolConnection | |||
) |
lscshext | ||
Hostname | ||
ServerPort | ||
ServerCompressed | ||
ClientCompressed | ||
immediate | ||
poolConnection |
openlsd.multiple.ophandler.extension.LSDPoolClientPut.LSDPoolClientPut | ( | String | Hostname, | |
int | ServerPort, | |||
boolean | ServerCompressed, | |||
boolean | ClientCompressed, | |||
boolean | immediate, | |||
LSDPoolConnection | poolConnection | |||
) |
Hostname | ||
ServerPort | ||
ServerCompressed | ||
ClientCompressed | ||
immediate | ||
poolConnection |
LSDClientCommonSessionHandler openlsd.multiple.ophandler.extension.LSDPoolClientPut.createSessionHandler | ( | ) | [protected, virtual] |
Create a SessionHandler. This function is rewritten to extend the original.
Reimplemented from openlsd.network.client.put.LSDClientPut.
void openlsd.multiple.ophandler.extension.LSDPoolClientPut.close | ( | ) |
Will close the current session and finalize the Client. Reconnection is still possible.
Reimplemented from openlsd.network.client.common.LSDClientCommon.
void openlsd.multiple.ophandler.extension.LSDPoolClientPut.prepare | ( | boolean | unique, | |
long | legacy, | |||
long | storage, | |||
long | document | |||
) | [private] |
Ask to prepare to put a file identified by the triple legacy, storage and document. The file will come from an object from Getwhich implies an extend of LSDClientPutSessionHandler with a new implementation of messageNewBlock.
The boolean unique set if the get should close the connection after the full send (true), or not (false).
This function uses acknowledge of each block.
This function uses no acknowledge for each block (quicker).
unique | ||
legacy | ||
storage | ||
document |
int openlsd.multiple.ophandler.extension.LSDPoolClientPut.prepareForward | ( | boolean | unique, | |
long | legacy, | |||
long | storage, | |||
long | document | |||
) |
Ask to prepare to put one file identified by the triple legacy, storage and document. Will put the result from the object of Get which implies an extend of LSDClientPutSessionHandler with a new implementation of messageNewBlock.
The boolean unique set if the get should close the connection after the full send (true), or not (false).
This function uses acknowledge of each block..
unique | ||
legacy | ||
storage | ||
document |
void openlsd.multiple.ophandler.extension.LSDPoolClientPut.prepareNoAck | ( | boolean | unique, | |
long | legacy, | |||
long | storage, | |||
long | document | |||
) | [private] |
Ask to prepare to put a file identified by the triple legacy, storage and document. The file will come from an object from Getwhich implies an extend of LSDClientPutSessionHandler with a new implementation of messageNewBlock.
The boolean unique set if the get should close the connection after the full send (true), or not (false).
This function is called by other calls to put data.
This function uses no acknowledge for each block (quicker).
unique | ||
legacy | ||
storage | ||
document |
int openlsd.multiple.ophandler.extension.LSDPoolClientPut.prepareNoAckForward | ( | boolean | unique, | |
long | legacy, | |||
long | storage, | |||
long | document | |||
) |
Ask to prepare to put one file identified by the triple legacy, storage and document. Will put the result from the object of Get which implies an extend of LSDClientPutSessionHandler with a new implementation of messageNewBlock.
The boolean unique set if the get should close the connection after the full send (true), or not (false).
This function uses no acknowledge for each block (quicker).
unique | ||
legacy | ||
storage | ||
document |
int openlsd.multiple.ophandler.extension.LSDPoolClientPut.finalizeForward | ( | ) |
Ask to finalize to put one file identified by the triple legacy, storage and document. Will end when the put of object of Get is complete.
At the end, object contains the MD5 in String and the file size.
boolean openlsd.multiple.ophandler.extension.LSDPoolClientPut.writeForward | ( | byte[] | bytes | ) |
WriteForward of one block from a sequence such as Get->Forward.
bytes |
int openlsd.network.client.put.LSDClientPut.putDataFromObject | ( | boolean | unique, | |
long | legacy, | |||
long | storage, | |||
long | document, | |||
Object | object | |||
) | [inherited] |
Ask to put Data (file) identified by the triple legacy, storage and document, and put the result from the byte array (or object which implies an extend of LSDClientPutSessionHandler with a new implementation of messageNewBlock).
The boolean unique set if the get should close the connection after the full send (true), or not (false).
This function uses acknowledge of each block.
At the end, object contains the MD5 in String and the file size.
unique | ||
legacy | ||
storage | ||
document | ||
object | (must be not null, and by default an array of byte) |
int openlsd.network.client.put.LSDClientPut.putNoAckDataFromObject | ( | boolean | unique, | |
long | legacy, | |||
long | storage, | |||
long | document, | |||
Object | object | |||
) | [inherited] |
Ask to put Data (file) identified by the triple legacy, storage and document, and put the result from the byte array (or object which implies an extend of LSDClientPutSessionHandler with a new implementation of messageNewBlock).
The boolean unique set if the get should close the connection after the full send (true), or not (false).
This function uses no acknowledge for each block (quicker).
At the end, object contains the MD5 in String and the file size.
unique | ||
legacy | ||
storage | ||
document | ||
object | (must be not null, and by default an array of byte) |
int openlsd.network.client.put.LSDClientPut.putFile | ( | boolean | unique, | |
long | legacy, | |||
long | storage, | |||
long | document, | |||
String | filepath | |||
) | [inherited] |
Ask to put a file from its filepath identified by the triple legacy, storage and document, and put the file from the pathfile which can be either a true access file path legal from the server or either a net access (ftp, http, ...).
The boolean unique set if the get should close the connection after the full send (true), or not (false).
At the end, object contains the MD5 in String and the file size.
unique | ||
legacy | ||
storage | ||
document | ||
filepath | (must be not null) |
void openlsd.network.client.common.LSDClientCommon.lock | ( | ) | [inherited] |
Lock in case of shared connection (no synchronized since if connection are not shared, they can be done in parallel)
static void openlsd.network.client.common.LSDClientCommon.initClient | ( | ) | [static, inherited] |
Init global structure like IoBufferAllocator
static void openlsd.network.client.common.LSDClientCommon.endClient | ( | ) | [static, inherited] |
End global structure like IoBufferAllocator
static void openlsd.network.client.common.LSDClientCommon.endClient | ( | boolean | toexit | ) | [static, inherited] |
End global structure like IoBufferAllocator
toexit |
void openlsd.network.client.common.LSDClientCommon.connect | ( | boolean | immediate, | |
boolean | keepalived | |||
) | [inherited] |
The client is now to be connected to the server using the specific SessionHandler that extends the LSDClientCommonSessionHandler class. This function is called by the Constructor.
If the connection is not ok, then the function isConnected() returns false. The client is immediately connected if immediate is true, else it will be connected after connectionJoint() will be called.
immediate | ||
keepalived | True if the chainFilter should add the keepalived feature (mandatory in immediate mode to true if the keepalived filter is wanted) |
boolean openlsd.network.client.common.LSDClientCommon.connectionJoin | ( | ) | [inherited] |
Join the connection, so as to finalize the connection process
boolean openlsd.network.client.common.LSDClientCommon.sessionReconnect | ( | ) | [inherited] |
Enable to try to reconnect to the server if disconnected.
boolean openlsd.network.client.common.LSDClientCommon.isConnected | ( | ) | [inherited] |
Returns the status of the connection and clear the session if not connected (sessionStop)
static boolean openlsd.network.client.common.LSDClientCommon.isSessionOK | ( | IoSession | session | ) | [static, inherited] |
Test if the session is still OK
session |
void openlsd.network.client.common.LSDClientCommon.clear | ( | ) | [inherited] |
clear session information
Object openlsd.network.client.common.LSDClientCommon.getObject | ( | ) | [inherited] |
Return the current user object of the session
void openlsd.network.client.common.LSDClientCommon.setObject | ( | Object | object | ) | [inherited] |
Set the current user object of the session
object |
Object openlsd.network.client.common.LSDClientCommon.clearObject | ( | ) | [inherited] |
Return the current user object of the session before clear the object stored.
void openlsd.network.client.common.LSDClientCommon.realClose | ( | ) | [inherited] |
Will totally close the current session and finalize the Client. Reconnection cannot be done.
int openlsd.network.client.common.LSDClientCommon.getStatus | ( | ) | [inherited] |
Return the status of the request: 1 running, 0 finished, -1 error system, -2 error as request, -3 error as unavailable request, -4 error as cannot restore to previous state, -5 error as bad client request, -6 error as no service.
void openlsd.network.client.common.LSDClientCommon.initShared | ( | ) | [inherited] |
Initialized a lock to enable shared connection among threads
void openlsd.network.client.common.LSDClientCommon.unlock | ( | ) | [inherited] |
UnLock in case of shared connection
String openlsd.network.client.common.LSDClientCommon.toString | ( | ) | [inherited] |
boolean openlsd.multiple.ophandler.extension.LSDPoolClientPut.isForward = false |
Is in Forward mode (Get->Put)
String openlsd.network.client.put.LSDClientPut.md5 = null [inherited] |
MD5 data
long openlsd.network.client.put.LSDClientPut.size = 0 [inherited] |
Original size of the file
String openlsd.network.client.common.LSDClientCommon.hostname = "localhost" [inherited] |
Hostname
int openlsd.network.client.common.LSDClientCommon.serverPort = 8080 [inherited] |
Port for the server
boolean openlsd.network.client.common.LSDClientCommon.serverCompressed = false [inherited] |
Are messages compressed from Server
boolean openlsd.network.client.common.LSDClientCommon.clientCompressed = false [inherited] |
Are messages compressed from Client
long openlsd.network.client.common.LSDClientCommon.idip = LSDConstants.invalide_idx [inherited] |
Idip of server: not mandatory, should be set if needed after constructor
IoSession openlsd.network.client.common.LSDClientCommon.session = null [inherited] |
Associated session
SocketConnector openlsd.network.client.common.LSDClientCommon.connector = null [inherited] |
Associated socket connector
LSDClientSession openlsd.network.client.common.LSDClientCommon.ls = null [inherited] |
Associated session info
LSDClientCommonSessionHandler openlsd.network.client.common.LSDClientCommon.lscsh = null [inherited] |
Associated Session Handler
ExecutorService openlsd.network.client.common.LSDClientCommon.executorChainService = null [inherited] |
Associated ExecutorChainService
LSDPoolConnectionAbstract openlsd.network.client.common.LSDClientCommon.poolConnection = null [inherited] |
The referent pool of connections if this connection is taken from a pool of connections