Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

virtual void Impala::Core::IDash::Server::GetJobs ( char *  buf,
int  len,
int  bufSize,
CString  conn,
int  port 
) [inline, protected, virtual]

Definition at line 146 of file Server.h.

References Impala::Util::ChannelServer::ConnectionDescr(), Impala::Util::StringParser::Eat(), Impala::Util::StringParser::GetString(), ILOG_ERROR, ILOG_INFO, Impala::Core::VideoJob::ServerProxy::IsConnected(), mJobMap, and mJobServer.

Referenced by AcceptRequest().

00147     {
00148         String curCon = ConnectionDescr();
00149         ILOG_INFO("GetJobs from " << curCon);
00150 
00151         if (!mJobServer->IsConnected())
00152         {
00153             ILOG_ERROR("Cannot do jobs: No connection to jobserver");
00154             return;
00155         }
00156 
00157         if (strncmp(buf, "GetJobs:", 7) == 0)
00158         {
00159             Util::StringParser parser(String(buf, len));
00160             parser.Eat("baseUri=");
00161             String baseUri = parser.GetString(';', true);
00162 
00163             std::vector<String> jobs = mJobMap.GetAllIdx();
00164             String s = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
00165             s += "<jobs xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns=\"http://www.i-dash.eu/MetaData\" >";
00166             for (int i=0 ; i<jobs.size() ; i++)
00167             {
00168                 String url = baseUri + "jobs/" + jobs[i];
00169                 s += "<job xlink:type=\"simple\" xlink:href=\"";
00170                 s += url;
00171                  s += "\" entityType=\"Job\" />";
00172             }
00173             s += "</jobs>";
00174             sprintf(buf, "Jobs:%s\0", s.c_str());
00175         }
00176         else
00177         {
00178             ILOG_ERROR("Invalid jobs request: " << String(buf, len));
00179         }
00180     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:19:50 2011 for ImpalaSrc by  doxygen 1.5.1