rasdaman complete source
|
#include <rnpcommunication.hh>
Public Member Functions | |
RnpClientJob () throw () | |
Default constructor. More... | |
void | init (CommBuffer *transmitterBuffer, RnpBaseClientComm *newClientComm) throw () |
void | processRequest () throw () |
Call-back function for the Communicator. More... | |
CommBuffer * | getAnswerBuffer () throw () |
bool | isAnswerOk () throw () |
Returns 'true' if the answer was correctly received. More... | |
bool | isInvalidFormat () throw () |
Returns true if the format of the received message is not valid RNP and was discarded. More... | |
void | clearAnswerBuffer () throw () |
Protected Member Functions | |
bool | validateMessage () throw () |
(See the explanations from NbJob) More... | |
void | executeOnWriteReady () throw () |
void | specificCleanUpOnTimeout () throw () |
void | executeOnReadError () throw () |
void | executeOnWriteError () throw () |
void | resetState () throw () |
Resets the object: clears the connection and marks the job as ready. More... | |
This class represents the RNP client job. It taker a CommBuffer, sends its data and receives the answer. Is directy owned and used by 'RnpBaseClientComm', so you don't have to worry about it Be aware that the transmitter buffer is freed after transmission!
rnp::RnpClientJob::RnpClientJob | ( | ) | ||
throw | ( | |||
) |
Default constructor.
void rnp::RnpClientJob::clearAnswerBuffer | ( | ) | ||
throw | ( | |||
) |
Clears the answer buffer. Important if huge amount of data where received. The buffer is cleared by the next transmission, also.
|
protected |
|
protected |
|
protected |
CommBuffer* rnp::RnpClientJob::getAnswerBuffer | ( | ) | ||
throw | ( | |||
) |
Returns a pointer to the buffer containing the answer. The buffer holds only the RNP message, without carrier header
void rnp::RnpClientJob::init | ( | CommBuffer * | transmitterBuffer, |
RnpBaseClientComm * | newClientComm | ||
) | |||
throw | ( | ||
) |
Initialization: takes the tarnsmitter buffer containing data to be send and a pointer to a Communicator object, which will coordinate the transmission Assert: transmitterBuffer!=0, newClientComm !=0
bool rnp::RnpClientJob::isAnswerOk | ( | ) | ||
throw | ( | |||
) |
Returns 'true' if the answer was correctly received.
bool rnp::RnpClientJob::isInvalidFormat | ( | ) | ||
throw | ( | |||
) |
Returns true if the format of the received message is not valid RNP and was discarded.
void rnp::RnpClientJob::processRequest | ( | ) | ||
throw | ( | |||
) |
Call-back function for the Communicator.
|
protected |
Resets the object: clears the connection and marks the job as ready.
|
protected |
|
protected |
(See the explanations from NbJob)