rasdaman complete source
Public Member Functions | Protected Member Functions | List of all members
rnp::RnpClientJob Class Reference

#include <rnpcommunication.hh>

Inheritance diagram for rnp::RnpClientJob:

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...
 

Detailed Description

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!

Constructor & Destructor Documentation

rnp::RnpClientJob::RnpClientJob ( )
throw (
)

Default constructor.

Member Function Documentation

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.

void rnp::RnpClientJob::executeOnReadError ( )
throw (
)
protected
void rnp::RnpClientJob::executeOnWriteError ( )
throw (
)
protected
void rnp::RnpClientJob::executeOnWriteReady ( )
throw (
)
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.

void rnp::RnpClientJob::resetState ( )
throw (
)
protected

Resets the object: clears the connection and marks the job as ready.

void rnp::RnpClientJob::specificCleanUpOnTimeout ( )
throw (
)
protected
bool rnp::RnpClientJob::validateMessage ( )
throw (
)
protected

(See the explanations from NbJob)


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