Exemplo n.º 1
0
string
TMSMapper::decodeProg(vector<unsigned int> separator, const string& msg){
  string res = string("");
  string property;
  res += (mmap.find(VISHNU_GETJOBPROG))->second;
  res += " ";
  property  = msg.substr(separator.at(0)+1, msg.size()-separator.at(0));
  TMS_Data::ProgressOptions_ptr job = NULL;

  //To parse the object serialized
  if(!vishnu::parseEmfObject(property, job)) {
    throw SystemException(ERRCODE_INVMAPPER, "option: "+property);
  }
  property = job->getUser();
  if (!property.empty()){
    res += " -u ";
    res += property;
  }
  property = job->getJobId();
  if (!property.empty()){
    res += " -i ";
    res += property;
  }
  property = job->getMachineId();
  if (!property.empty()){
    res += " -m ";
    res += property;
  }
  return res;
}
Exemplo n.º 2
0
string
TMSMapper::decodeProg(vector<unsigned int> separator, const string& msg){
	string res = string("");
	string u;
	res += (mmap.find(VISHNU_GETJOBPROG))->second;
	res+= " ";
	u    = msg.substr(separator.at(0)+1, separator.at(1)-2);
	res += u;
	u    = msg.substr(separator.at(1)+1, msg.size()-separator.at(1));
	TMS_Data::ProgressOptions_ptr j = NULL;

	//To parse the object serialized
	if(!vishnu::parseEmfObject(u, j)) {
		throw SystemException(ERRCODE_INVMAPPER, "option: "+u);
	}
	u = j->getJobOwner();
	if (u.compare("")){
		res += " -u ";
		res += u;
	}
	u = j->getJobId();
	if (u.compare("")){
		res += " -i ";
		res += u;
	}
	return res;
}