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

virtual int Impala::Job::Server::AcceptRequest ( char *  buf,
int  len,
int  bufSize,
CString  conn,
int  port 
) [inline, protected, virtual]

Reimplemented from Impala::Util::ChannelServer.

Definition at line 171 of file Server.h.

References AcceptJobStatus(), AcceptNewJob(), AcceptRequestForJob(), AcceptRequestForStatus(), Impala::ILogErrors::GetInstance(), Impala::ILogErrors::GetLastErrorSinceMark(), Impala::ILogErrors::GetNrErrorsSinceMark(), Impala::ILogErrors::Mark(), and mPoisoned.

00172     {
00173         int rcBase = ChannelServer::AcceptRequest(buf, len, bufSize, conn, port);
00174         if (rcBase >= 0)
00175             return rcBase;
00176 
00177         ILogErrors& errors = ILogErrors::GetInstance();
00178         errors.Mark();
00179 
00180         if (strncmp(buf, "AcceptJob", 9) == 0)
00181             AcceptNewJob(buf, len, bufSize, conn, port);
00182         else if (strncmp(buf, "ProvideStatus", 13) == 0)
00183             AcceptRequestForStatus(buf, len, bufSize, conn, port);
00184         else if (strncmp(buf, "ProvideJob", 10) == 0)
00185             AcceptRequestForJob(buf, len, bufSize, conn, port);
00186         else if (strncmp(buf, "AcceptStatus", 12) == 0)
00187             AcceptJobStatus(buf, len, bufSize, conn, port);
00188         else if (strncmp(buf, "Poison", 6) == 0)
00189             mPoisoned = !mPoisoned;
00190         else
00191             return -1;
00192 
00193         if (errors.GetNrErrorsSinceMark() > 0)
00194         {
00195             String last = errors.GetLastErrorSinceMark();
00196             sprintf(buf, "ERROR : last error at server : %s\0", last.c_str());
00197         }
00198 
00199         return strlen(buf) + 1;
00200     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:22:21 2011 for ImpalaSrc by  doxygen 1.5.1