Commit 9c962fbc authored by David COME's avatar David COME
Browse files

Expanded ClientInterface's interface

ClientInterface gained reportMigrationResults,reportEndOfSession(WithError) and VolumeInfod moved also to ClientInterface
parent bb95d377
...@@ -28,10 +28,10 @@ namespace daemon { ...@@ -28,10 +28,10 @@ namespace daemon {
class ClientInterface { class ClientInterface {
public : public :
/** /**
* Class holding the timing information for the request/reply, * Class holding the timing information for the request/reply,
* and the message sequence Id. * and the message sequence Id.
*/ */
class RequestReport { class RequestReport {
public: public:
RequestReport(): transactionId(0), RequestReport(): transactionId(0),
...@@ -40,12 +40,56 @@ public : ...@@ -40,12 +40,56 @@ public :
double connectDuration; double connectDuration;
double sendRecvDuration; double sendRecvDuration;
}; };
/**
* Class holding the result of a Volume request
*/
class VolumeInfo {
public:
VolumeInfo() {};
/** The VID we will work on */
std::string vid;
/** The type of the session */
tapegateway::ClientType clientType;
/** The density of the volume */
std::string density;
/** The label field seems to be in disuse */
std::string labelObsolete;
/** The read/write mode */
tapegateway::VolumeMode volumeMode;
};
virtual tapegateway::FilesToRecallList * getFilesToRecall(uint64_t files, virtual tapegateway::FilesToRecallList* getFilesToRecall(uint64_t files,
uint64_t bytes, RequestReport &report) uint64_t bytes, RequestReport &report) throw (castor::tape::Exception) = 0;
throw (castor::tape::Exception) = 0;
virtual ~ClientInterface(){} /**
* Reports the result of migrations to the client.
* Detailed interface is still TBD.
* @param report Placeholder to network timing information
*/
virtual void reportMigrationResults(tapegateway::FileMigrationReportList & migrationReport,
RequestReport &report) throw (castor::tape::Exception) =0;
/**
* Reports end of session to the client. This should be the last call to
* the client.
* @param transactionReport Placeholder to network timing information,
* populated during the call and used by the caller to log performance
* and context information
* @param errorMsg (sent to the client)
* @param errorCode (sent to the client)
*/
virtual void reportEndOfSessionWithError(const std::string & errorMsg, int errorCode,
RequestReport &transactionReport) throw (castor::tape::Exception) = 0;
/**
* Reports end of session to the client. This should be the last call to
* the client.
*/
virtual void reportEndOfSession(RequestReport &report) throw (Exception) = 0;
virtual ~ClientInterface(){}
}; };
}}}} }}}}
......
...@@ -56,24 +56,6 @@ namespace daemon { ...@@ -56,24 +56,6 @@ namespace daemon {
ClientProxy(const legacymsg::RtcpJobRqstMsgBody & clientRequest) ClientProxy(const legacymsg::RtcpJobRqstMsgBody & clientRequest)
throw (castor::tape::Exception); throw (castor::tape::Exception);
/**
* Class holding the result of a Volume request
*/
class VolumeInfo {
public:
VolumeInfo() {};
/** The VID we will work on */
std::string vid;
/** The type of the session */
tapegateway::ClientType clientType;
/** The density of the volume */
std::string density;
/** The label field seems to be in disuse */
std::string labelObsolete;
/** The read/write mode */
tapegateway::VolumeMode volumeMode;
};
/** /**
* Retrieves the volume Id from the client (with transfer direction) * Retrieves the volume Id from the client (with transfer direction)
* Throws an EndOfSession exception * Throws an EndOfSession exception
...@@ -87,7 +69,7 @@ namespace daemon { ...@@ -87,7 +69,7 @@ namespace daemon {
* Reports end of session to the client. This should be the last call to * Reports end of session to the client. This should be the last call to
* the client. * the client.
*/ */
void reportEndOfSession(RequestReport &report) throw (Exception); virtual void reportEndOfSession(RequestReport &report) throw (Exception);
/** /**
* Reports end of session to the client. This should be the last call to * Reports end of session to the client. This should be the last call to
...@@ -98,7 +80,7 @@ namespace daemon { ...@@ -98,7 +80,7 @@ namespace daemon {
* @param errorMsg (sent to the client) * @param errorMsg (sent to the client)
* @param errorCode (sent to the client) * @param errorCode (sent to the client)
*/ */
void reportEndOfSessionWithError(const std::string & errorMsg, int errorCode, virtual void reportEndOfSessionWithError(const std::string & errorMsg, int errorCode,
RequestReport &transactionReport) throw (castor::tape::Exception); RequestReport &transactionReport) throw (castor::tape::Exception);
/** /**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment