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
......@@ -41,9 +41,53 @@ public :
double sendRecvDuration;
};
virtual tapegateway::FilesToRecallList * getFilesToRecall(uint64_t files,
uint64_t bytes, RequestReport &report)
throw (castor::tape::Exception) = 0;
/**
* 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,
uint64_t bytes, RequestReport &report) throw (castor::tape::Exception) = 0;
/**
* 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 {
ClientProxy(const legacymsg::RtcpJobRqstMsgBody & clientRequest)
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)
* Throws an EndOfSession exception
......@@ -87,7 +69,7 @@ namespace daemon {
* Reports end of session to the client. This should be the last call to
* 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
......@@ -98,7 +80,7 @@ namespace daemon {
* @param errorMsg (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);
/**
......
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