NCBI C++ ToolKit
Classes | Defines | Typedefs | Enumerations | Enumerator | Functions | Variables | Friends
Client API to NCBI NetSchedule
General Purpose Network Infrastructure Services
+ Collaboration diagram for Client API to NCBI NetSchedule:

Classes

class  CGridJobBatchSubmitter
 Grid Job Batch Submitter. More...
class  CGridClient
 Grid Client (the submitter). More...
class  CGridClientException
 Grid Client exception. More...
class  CGridClientApp
 Grid Client Application. More...
class  IWorkerNodeCleanupEventListener
class  IWorkerNodeCleanupEventSource
 Clean-up event source for the worker node. More...
class  IWorkerNodeInitContext
 Worker Node initialize context. More...
class  IWorkerNodeJob
 Worker Node Job interface. More...
class  CWorkerNodeJobContext
 Worker Node job context. More...
class  CWorkerNodeIdleTaskContext
 Worker Node Idle Task Context. More...
class  IWorkerNodeIdleTask
 Worker Node Idle Task Interface. More...
class  IWorkerNodeJobFactory
 Worker Node Job Factory interface. More...
class  CSimpleJobFactory< TWorkerNodeJob >
class  CSimpleJobFactoryEx< TWorkerNodeJob, TWorkerNodeIdleTask >
class  IWorkerNodeJobWatcher
 Jobs watcher interface. More...
class  CGridWorkerNode
 Grid Worker Node. More...
class  CGridWorkerNodeException
class  CDefaultWorkerNodeInitContext
 Default implementation of a worker node initialization interface. More...
class  IGridWorkerNodeApp_Listener
 Listener of events generated by CGridWorkerNodeApp. More...
class  CGridWorkerNodeApp_Listener
 An adapter class for IGridWorkerNodeApp_Listener. More...
class  CGridWorkerApp
 Main Worker Node application. More...
class  CNetScheduleAPI
 Client API for NCBI NetSchedule server. More...
struct  CNetScheduleJob
 Job description. More...
class  CNetScheduleSubmitter
 Smart pointer to the job submission part of the NetSchedule API. More...
class  CNetScheduleExecutor
 Smart pointer to a part of the NetSchedule API that does job retrieval and processing on the worker node side. More...
class  CNetScheduleJobReader
 Smart pointer to a part of the NetSchedule API that allows to retrieve completed jobs. More...
class  CNetScheduleAdmin
class  CNetScheduleNotificationHandler
class  CNetScheduleExceptionMap
 Map from exception names to codes. More...
class  CNetScheduleException
 NetSchedule internal exception. More...
struct  CNetScheduleKey
 Meaningful information encoded in the NetSchedule key. More...
class  CNetScheduleKeyGenerator
class  CGridCgiContext
 Grid CGI Context Context in which a request is processed. More...
class  CGridCgiApplication
 Grid Cgi Application. More...
class  CRemoteCgiApp
class  CCgi2RCgiApp
class  CRegexpTemplateFilter

Defines

#define NCBI_DECLARE_WORKERNODE_FACTORY(TWorkerNodeJob, Version)
#define NCBI_DECLARE_WORKERNODE_FACTORY_EX(TWorkerNodeJob, TWorkerNodeIdleTask, Version)
#define NCBI_DECLARE_WORKERNODE_FACTORY_PKG_VER_EX(TWorkerNodeJob, TWorkerNodeIdleTask)
#define GRID_WORKER_APP_NAME   NcbiEmptyString
#define NCBI_WORKERNODE_CLASS   CGridWorkerApp
#define NCBI_WORKERNODE_MAIN(TWorkerNodeJob, Version)
#define NCBI_WORKERNODE_MAIN_WITH_LISTENER(TWorkerNodeJob, Version,ListenerClass)
#define NCBI_WORKERNODE_MAIN_EX(TWorkerNodeJob,TWorkerNodeIdleTask, Version)
#define NCBI_GRID_PKG_WORKER_NODE_MAIN(TWorkerNodeJob,TWorkerNodeJobFactoryClass, ListenerClass)
#define CALLBACK_PARAM   "callback="

Typedefs

typedef CGridClient CGridJobSubmitter
typedef CGridClient CGridJobStatus
typedef CNetScheduleExecutor CNetScheduleExecuter
typedef map< string, stringCGridCgiContext::TPersistedEntries
typedef map< string, stringCGridCgiContext::TPersistentEntries

Enumerations

enum  CGridClient::ECleanUp { CGridClient::eAutomaticCleanup = 0, CGridClient::eManualCleanup }
enum  CGridClient::EProgressMsg { CGridClient::eProgressMsgOn = 0, CGridClient::eProgressMsgOff }
enum  CGridClientException::EErrCode { CGridClientException::eBatchAlreadySubmitted }
 Error types that an application can generate. More...
enum  CCgi2RCgiApp::EJobPhase { CCgi2RCgiApp::ePending, CCgi2RCgiApp::eRunning, CCgi2RCgiApp::eTerminated }
enum  { CCgi2RCgiApp::eUseQueryString = 1, CCgi2RCgiApp::eUseRequestContent = 2 }

Functions

void CGridJobBatchSubmitter::SetJobInput (const string &input)
 Set a job's input This string will be sent to then the job is submitted.
CNcbiOstreamCGridJobBatchSubmitter::GetOStream ()
 Get a stream where a client can write an input data for the remote job.
void CGridJobBatchSubmitter::SetJobMask (CNetScheduleAPI::TJobMask mask)
 Set a job mask.
void CGridJobBatchSubmitter::SetJobAffinity (const string &affinity)
 Set a job affinity.
void CGridJobBatchSubmitter::PrepareNextJob ()
void CGridJobBatchSubmitter::Submit (const string &job_group=kEmptyStr)
 Submit a batch to the queue.
void CGridJobBatchSubmitter::Reset ()
const vector< CNetScheduleJob > & CGridJobBatchSubmitter::GetBatch () const
void CGridJobBatchSubmitter::CheckIfBatchAlreadySubmitted ()
void CGridJobBatchSubmitter::CheckIfBatchSubmittedAndPrepareNextJob ()
 CGridJobBatchSubmitter::CGridJobBatchSubmitter (CGridClient &)
 CGridJobBatchSubmitter::CGridJobBatchSubmitter (const CGridJobBatchSubmitter &)
 The copy constructor and the assignment operator are prohibited.
CGridJobBatchSubmitterCGridJobBatchSubmitter::operator= (CGridJobBatchSubmitter &)
 CGridClient::CGridClient (CNetScheduleSubmitter::TInstance ns_submitter, IBlobStorage &storage, ECleanUp cleanup, EProgressMsg progress_msg)
 Constructor.
 CGridClient::CGridClient (CNetScheduleSubmitter::TInstance ns_submitter, CNetCacheAPI::TInstance nc_client, ECleanUp cleanup, EProgressMsg progress_msg)
 Constructor.
CGridClientCGridClient::GetJobSubmitter ()
 Get a job submitter.
const stringCGridClient::GetJobOutput ()
 Get a job's output string.
const stringCGridClient::GetJobInput ()
 Get a job's input sting.
int CGridClient::GetReturnCode ()
 Get a job's return code.
const stringCGridClient::GetErrorMessage ()
 If something bad has happened this method will return an explanation.
CNetScheduleAPI::EJobStatus CGridClient::GetStatus ()
 Get a job status.
CNcbiIstreamCGridClient::GetIStream ()
 Get a stream with a job's result.
size_t CGridClient::GetBlobSize () const
 Get the size of an input stream.
string CGridClient::GetProgressMessage ()
 Get a job interim message.
void CGridClient::SetJobInput (const string &input)
 Set a job's input This string will be sent to then the job is submitted.
CNcbiOstreamCGridClient::GetOStream ()
 Get a stream where a client can write an input data for the remote job.
void CGridClient::CloseStream ()
void CGridClient::SetJobMask (CNetScheduleAPI::TJobMask mask)
void CGridClient::SetJobGroup (const string &group)
void CGridClient::SetJobAffinity (const string &affinity)
string CGridClient::Submit (const string &affinity=kEmptyStr)
 Submit a job to the queue.
CNetScheduleAPI::EJobStatus CGridClient::SubmitAndWait (unsigned wait_time)
 Submit a job to the queue.
CNetScheduleJobCGridClient::GetJob ()
CGridJobBatchSubmitterCGridClient::GetJobBatchSubmitter ()
 Get a job submitter.
CGridClientCGridClient::GetJobStatus (const string &job_key)
 Get a job status checker.
void CGridClient::SetJobKey (const string &job_key)
void CGridClient::CancelJob (const string &job_key)
 Cancel Job.
void CGridClient::RemoveDataBlob (const string &data_key)
 Remove a data blob from the storage.
CNetScheduleSubmitter CGridClient::GetNetScheduleSubmitter ()
CNetCacheAPICGridClient::GetNetCacheAPI ()
size_t CGridClient::GetMaxServerInputSize ()
void CGridClient::Init (ECleanUp cleanup, EProgressMsg progress_msg)
void CGridClient::x_ProlongBlobLifetime (const string &blob_key, unsigned ttl)
bool CGridClient::x_ProlongJobFieldLifetime (const string &job_field, unsigned ttl)
void CGridClient::x_RenewAllJobBlobs (time_t job_exptime)
void CGridClient::x_GetJobDetails ()
 CGridClient::CGridClient (const CGridClient &)
 The copy constructor and the assignment operator are prohibited.
CGridClientCGridClient::operator= (const CGridClient &)
virtual const char * CGridClientException::GetErrCodeString (void) const
 Get error code interpreted as text.
 CGridClientException::NCBI_EXCEPTION_DEFAULT (CGridClientException, CException)
virtual void CGridClientApp::Init (void)
 If you override this method, do call CGridClientApp::Init() from inside your overriding method.
CGridClientCGridClientApp::GetGridClient ()
 Get a grid client.
virtual string CGridClientApp::GetProgramVersion (void) const =0
 Get program version (like: MyProgram v.
virtual bool CGridClientApp::UseProgressMessage () const
virtual bool CGridClientApp::UseAutomaticCleanup () const
 NCBI_DECLARE_INTERFACE_VERSION (SNetScheduleAPIImpl,"xnetschedule_api", 1, 0, 0)
void g_AppendClientIPAndSessionID (string &cmd, const string *default_session=NULL)
void g_AppendHitID (string &cmd)
void g_AppendClientIPSessionIDHitID (string &cmd, const string *default_session=NULL)
int g_ParseNSOutput (const string &attr_string, const char *const *attr_names, string *attr_values, int attr_count)
void NCBI_EntryPoint_xnetscheduleapi (CPluginManager< SNetScheduleAPIImpl >::TDriverInfoList &info_list, CPluginManager< SNetScheduleAPIImpl >::EEntryPointRequest method)
unsigned s_GetRemainingSeconds (const CDeadline &deadline)
 CGridCgiContext::CGridCgiContext (CHTMLPage &page, CCgiContext &ctx)
 CGridCgiContext::~CGridCgiContext ()
CHTMLPageCGridCgiContext::GetHTMLPage (void)
 Get an HTML page.
string CGridCgiContext::GetSelfURL (void) const
 Get Self URL.
const stringCGridCgiContext::GetJobKey (void) const
 Get Current job key.
const stringCGridCgiContext::GetJobProgressMessage (void) const
 Get current job progress message.
const stringCGridCgiContext::GetEntryValue (const string &entry_name) const
 Get a value from a CGI request.
void CGridCgiContext::PullUpPersistentEntry (const string &entry_name)
 Save this entry as a cookie add it to serf url.
void CGridCgiContext::DefinePersistentEntry (const string &entry_name, const string &value)
CCgiContextCGridCgiContext::GetCGIContext ()
 Get CGI Context.
void CGridCgiContext::SetCompleteResponse (CNcbiIstream &is)
bool CGridCgiContext::NeedRenderPage () const
string CGridCgiContext::GetHiddenFields () const
const stringCGridCgiContext::GetJobInput () const
const stringCGridCgiContext::GetJobOutput () const
void CGridCgiContext::Clear ()
 Remove all persisted entries from cookie and self url.
void CGridCgiContext::SetJobKey (const string &job_key)
void CGridCgiContext::SetJobProgressMessage (const string &msg)
void CGridCgiContext::SetJobInput (const string &input)
void CGridCgiContext::SetJobOutput (const string &output)
 CGridCgiContext::CGridCgiContext (const CGridCgiContext &)
 A copy constructor and an assignment operator are prohibited.
CGridCgiContextCGridCgiContext::operator= (const CGridCgiContext &)
virtual void CGridCgiApplication::Init (void)
 This method is called on the CGI application initialization -- before starting to process a HTTP request or even receiving one.
virtual int CGridCgiApplication::ProcessRequest (CCgiContext &ctx)
 Do not override this method yourself! -- it includes all the GRIDCGI specific machinery.
virtual string CGridCgiApplication::GetProgramVersion (void) const =0
 Get program version (like: MyProgram v.
virtual void CGridCgiApplication::ShowParamsPage (CGridCgiContext &ctx) const =0
 Show a page with input data.
virtual bool CGridCgiApplication::CollectParams (CGridCgiContext &ctx)=0
 Collect parameters from HTML form If this method returns false that means that input parameters were not specified (or were incorrect).
virtual void CGridCgiApplication::PrepareJobData (CGridClient &grid_client)=0
 This method is called when a job is ready to be send to a the queue.
virtual void CGridCgiApplication::OnJobSubmitted (CGridCgiContext &ctx)
 This method is called just after a job has been submitted.
virtual void CGridCgiApplication::OnJobDone (CGridClient &grid_client, CGridCgiContext &ctx)=0
 This method is call when a worker node finishes its job and result is ready to be retrieved.
virtual void CGridCgiApplication::OnJobFailed (const string &msg, CGridCgiContext &ctx)
 This method is called when worker node reported a failure.
virtual void CGridCgiApplication::OnJobCanceled (CGridCgiContext &ctx)
 This method is called if job was canceled during its execution.
virtual void CGridCgiApplication::OnJobRunning (CGridCgiContext &ctx)
 This method is call when a job is taken by a worker node to be processed.
virtual void CGridCgiApplication::OnJobPending (CGridCgiContext &ctx)
 This method is call when a job is in NetSchedule queue and is waiting for a worker node.
virtual void CGridCgiApplication::OnEndProcessRequest (CGridCgiContext &)
 This method is call at the very end of the request processing.
virtual void CGridCgiApplication::OnBeginProcessRequest (CGridCgiContext &)
 This method is call at the very beginning of the request processing.
virtual void CGridCgiApplication::OnQueueIsBusy (CGridCgiContext &)
 This method is call when a job couldn't be submitted because of NetSchedule queue is full.
virtual string CGridCgiApplication::GetPageTitle (void) const =0
 Return page name.
virtual string CGridCgiApplication::GetPageTemplate (void) const =0
 Return a name of a file this HTML page template.
virtual bool CGridCgiApplication::JobStopRequested (void) const
 When job is still running this method is called to check if cancel has been requested via the user interface(HTML).
CGridClientCGridCgiApplication::GetGridClient (void)
 Get a Grid Client.
void CGridCgiApplication::InitGridClient ()
 Initialize grid client.
void CGridCgiApplication::RenderRefresh (CHTMLPage &page, const string &url, int delay)
bool CGridCgiApplication::x_JobStopRequested (const CGridCgiContext &) const
bool CGridCgiApplication::x_CheckJobStatus (CGridCgiContext &grid_ctx)
virtual bool CGridCgiApplication::IsCachingNeeded (const CCgiRequest &request) const
 CGridCgiContext::CGridCgiContext (CHTMLPage &page, CHTMLPage &custom_http_header, CCgiContext &ctx)
const stringCGridCgiContext::GetPersistentEntryValue (const string &entry_name) const
void CGridCgiContext::GetQueryStringEntryValue (const string &entry_name, string &value) const
void CGridCgiContext::GetRequestEntryValue (const string &entry_name, string &value) const
void CGridCgiContext::PullUpPersistentEntry (const string &entry_name, string &value)
const TPersistentEntries & CGridCgiContext::GetPersistentEntries () const
void CGridCgiContext::LoadQueryStringTags (CHTMLPlainText::EEncodeMode encode_mode)
void CGridCgiContext::SelectView (const string &view_name)
void CGridCgiContext::NeedRenderPage (bool value)
virtual void CCgi2RCgiApp::Init ()
 This method is called on the CGI application initialization -- before starting to process a HTTP request or even receiving one.
virtual CCgiContextCCgi2RCgiApp::CreateContextWithFlags (CNcbiArguments *args, CNcbiEnvironment *env, CNcbiIstream *inp, CNcbiOstream *out, int ifd, int ofd, int flags)
 The same as CreateContext(), but allows for a custom set of flags to be specified in the CCgiRequest constructor.
virtual int CCgi2RCgiApp::ProcessRequest (CCgiContext &ctx)
 This is the method you should override.
void CCgi2RCgiApp::DefineRefreshTags (const string &url, int delay)
EJobPhase CCgi2RCgiApp::x_CheckJobStatus (CGridCgiContext &grid_ctx, const string &jquery_callback)
void CCgi2RCgiApp::OnJobDone (const string &job_key, CGridCgiContext &ctx, const string &jquery_callback)
void CCgi2RCgiApp::OnJobFailed (const string &msg, CGridCgiContext &ctx)
 CRegexpTemplateFilter::CRegexpTemplateFilter (CHTMLPage *page)
virtual bool CRegexpTemplateFilter::TestAttribute (const string &attr_name, const string &test_pattern)
static void s_RemoveCallbackParameter (string *query_string)
int main (int argc, const char *argv[])
void CGridWorkerApp::SetListener (IGridWorkerNodeApp_Listener *listener)
 Register a listener of events of this class.
string CNetScheduleKeyGenerator::Generate (unsigned id) const

Variables

CGridClientCGridJobBatchSubmitter::m_GridClient
vector< CNetScheduleJobCGridJobBatchSubmitter::m_Jobs
size_t CGridJobBatchSubmitter::m_JobIndex
bool CGridJobBatchSubmitter::m_HasBeenSubmitted
auto_ptr< IEmbeddedStreamWriterCGridJobBatchSubmitter::m_Writer
auto_ptr< CNcbiOstreamCGridJobBatchSubmitter::m_WStream
CNetScheduleSubmitter CGridClient::m_NetScheduleSubmitter
CNetCacheAPI CGridClient::m_NetCacheAPI
CNetScheduleJob CGridClient::m_Job
auto_ptr< IEmbeddedStreamWriterCGridClient::m_Writer
auto_ptr< CNcbiOstreamCGridClient::m_WStream
auto_ptr< CGridJobBatchSubmitterCGridClient::m_JobBatchSubmitter
size_t CGridClient::m_BlobSize
bool CGridClient::m_AutoCleanUp
bool CGridClient::m_UseProgress
auto_ptr< CNcbiIstreamCGridClient::m_RStream
bool CGridClient::m_JobDetailsRead
auto_ptr< CGridClientCGridClientApp::m_GridClient
const char *const kNetScheduleAPIDriverName
CHTMLPageCGridCgiContext::m_Page
CCgiContextCGridCgiContext::m_CgiContext
TCgiEntries CGridCgiContext::m_ParsedQueryString
TPersistedEntries CGridCgiContext::m_PersistedEntries
string CGridCgiContext::m_ProgressMsg
string CGridCgiContext::m_JobInput
string CGridCgiContext::m_JobOutput
bool CGridCgiContext::m_NeedRenderPage
int CGridCgiApplication::m_RefreshDelay
int CGridCgiApplication::m_FirstDelay
CNetScheduleAPI CGridCgiApplication::m_NSClient
CNetCacheAPI CGridCgiApplication::m_NetCacheAPI
auto_ptr< CGridClientCGridCgiApplication::m_GridClient
CCgiResponseCGridCgiApplication::m_Response
CHTMLPageCGridCgiContext::m_CustomHTTPHeader
TPersistentEntries CGridCgiContext::m_PersistentEntries
int CCgi2RCgiApp::m_RefreshDelay
int CCgi2RCgiApp::m_FirstDelay
CNetScheduleAPI CCgi2RCgiApp::m_NetScheduleAPI
CNetCacheAPI CCgi2RCgiApp::m_NetCacheAPI
auto_ptr< CGridClientCCgi2RCgiApp::m_GridClient
CCgiResponseCCgi2RCgiApp::m_Response
string CCgi2RCgiApp::m_Title
string CCgi2RCgiApp::m_FallBackUrl
int CCgi2RCgiApp::m_FallBackDelay
int CCgi2RCgiApp::m_CancelGoBackDelay
string CCgi2RCgiApp::m_DateFormat
string CCgi2RCgiApp::m_ElapsedTimeFormat
bool CCgi2RCgiApp::m_InterceptJQueryCallback
bool CCgi2RCgiApp::m_AddJobIdToHeader
auto_ptr< CHTMLPageCCgi2RCgiApp::m_Page
auto_ptr< CHTMLPageCCgi2RCgiApp::m_CustomHTTPHeader
string CCgi2RCgiApp::m_HtmlTemplate
vector< stringCCgi2RCgiApp::m_HtmlIncs
string CCgi2RCgiApp::m_AffinityName
int CCgi2RCgiApp::m_AffinitySource
int CCgi2RCgiApp::m_AffinitySetLimit
string CCgi2RCgiApp::m_ContentType
CHTMLPlainText::EEncodeMode CCgi2RCgiApp::m_TargetEncodeMode
bool CCgi2RCgiApp::m_HTMLPassThrough
static const string kGridCgiForm = "</FORM>"
static const string kPlainTextView = "<@STAT_VIEW@>"
CHTMLPageCRegexpTemplateFilter::m_Page

Friends

class CGridJobBatchSubmitter::CGridClient
 Only CGridClient can create an instance of this class.
class CGridCgiContext::CGridCgiApplication

Define Documentation

#define CALLBACK_PARAM   "callback="

Definition at line 562 of file cgi2rcgi.cpp.

Referenced by s_RemoveCallbackParameter().

Definition at line 178 of file grid_worker_app.hpp.

#define NCBI_DECLARE_WORKERNODE_FACTORY (   TWorkerNodeJob,
  Version 
)
Value:
class TWorkerNodeJob##Factory : public CSimpleJobFactory<TWorkerNodeJob> \
{                                                                        \
public:                                                                  \
    virtual string GetJobVersion() const                                 \
    {                                                                    \
        return #TWorkerNodeJob " version " NCBI_AS_STRING(Version);      \
    }                                                                    \
    virtual string GetAppName() const                                    \
    {                                                                    \
        return #TWorkerNodeJob;                                          \
    }                                                                    \
    virtual string GetAppVersion() const                                 \
    {                                                                    \
        return NCBI_AS_STRING(Version);                                  \
    }                                                                    \
}

Definition at line 452 of file grid_worker.hpp.

#define NCBI_DECLARE_WORKERNODE_FACTORY_EX (   TWorkerNodeJob,
  TWorkerNodeIdleTask,
  Version 
)
Value:
class TWorkerNodeJob##FactoryEx                                          \
    : public CSimpleJobFactoryEx<TWorkerNodeJob, TWorkerNodeIdleTask>    \
{                                                                        \
public:                                                                  \
    virtual string GetJobVersion() const                                 \
    {                                                                    \
        return #TWorkerNodeJob " version " NCBI_AS_STRING(Version);      \
    }                                                                    \
    virtual string GetAppName() const                                    \
    {                                                                    \
        return #TWorkerNodeJob;                                          \
    }                                                                    \
    virtual string GetAppVersion() const                                 \
    {                                                                    \
        return NCBI_AS_STRING(Version);                                  \
    }                                                                    \
}

Definition at line 496 of file grid_worker.hpp.

#define NCBI_DECLARE_WORKERNODE_FACTORY_PKG_VER_EX (   TWorkerNodeJob,
  TWorkerNodeIdleTask 
)
Value:
class TWorkerNodeJob##FactoryEx                                          \
    : public CSimpleJobFactoryEx<TWorkerNodeJob, TWorkerNodeIdleTask>    \
{                                                                        \
public:                                                                  \
    virtual string GetJobVersion() const                                 \
    {                                                                    \
        return GRID_APP_VERSION_INFO;                                    \
    }                                                                    \
    virtual string GetAppName() const                                    \
    {                                                                    \
        return GRID_APP_NAME;                                            \
    }                                                                    \
    virtual string GetAppVersion() const                                 \
    {                                                                    \
        return GRID_APP_VERSION;                                         \
    }                                                                    \
}

Definition at line 516 of file grid_worker.hpp.

#define NCBI_GRID_PKG_WORKER_NODE_MAIN (   TWorkerNodeJob,
  TWorkerNodeJobFactoryClass,
  ListenerClass 
)
Value:
int main(int argc, const char* argv[])                                  \
    {                                                                       \
        GRID_APP_CHECK_VERSION_ARGS();                                      \
        GetDiagContext().SetOldPostFormat(false);                           \
        NCBI_WORKERNODE_CLASS app(new TWorkerNodeJobFactoryClass);          \
        app.SetListener(new ListenerClass);                                 \
        return app.AppMain(argc, argv, NULL, eDS_ToStdlog,                  \
                NcbiEmptyCStr, GRID_WORKER_APP_NAME);                       \
    }

Definition at line 227 of file grid_worker_app.hpp.

Definition at line 186 of file grid_worker_app.hpp.

#define NCBI_WORKERNODE_MAIN (   TWorkerNodeJob,
  Version 
)
Value:
NCBI_DECLARE_WORKERNODE_FACTORY(TWorkerNodeJob, Version);               \
    int main(int argc, const char* argv[])                                  \
    {                                                                       \
        GetDiagContext().SetOldPostFormat(false);                           \
        NCBI_WORKERNODE_CLASS app(new TWorkerNodeJob##Factory,                     \
            CVersionInfo(#Version));                                        \
        return app.AppMain(argc, argv, NULL, eDS_ToStdlog,                  \
                NcbiEmptyCStr, GRID_WORKER_APP_NAME);                       \
    }

Definition at line 190 of file grid_worker_app.hpp.

#define NCBI_WORKERNODE_MAIN_EX (   TWorkerNodeJob,
  TWorkerNodeIdleTask,
  Version 
)
Value:
NCBI_DECLARE_WORKERNODE_FACTORY_EX(TWorkerNodeJob,                      \
            TWorkerNodeIdleTask, Version);                                  \
    int main(int argc, const char* argv[])                                  \
    {                                                                       \
        GetDiagContext().SetOldPostFormat(false);                           \
        NCBI_WORKERNODE_CLASS app(new TWorkerNodeJob##FactoryEx,            \
            CVersionInfo(#Version));                                        \
        return app.AppMain(argc, argv, NULL, eDS_ToStdlog,                  \
                NcbiEmptyCStr, GRID_WORKER_APP_NAME);                       \
    }

Definition at line 214 of file grid_worker_app.hpp.

#define NCBI_WORKERNODE_MAIN_WITH_LISTENER (   TWorkerNodeJob,
  Version,
  ListenerClass 
)
Value:
NCBI_DECLARE_WORKERNODE_FACTORY(TWorkerNodeJob, Version);               \
    int main(int argc, const char* argv[])                                  \
    {                                                                       \
        GetDiagContext().SetOldPostFormat(false);                           \
        NCBI_WORKERNODE_CLASS app(new TWorkerNodeJob##Factory,              \
            CVersionInfo(#Version));                                        \
        app.SetListener(new ListenerClass);                                 \
        return app.AppMain(argc, argv, NULL, eDS_ToStdlog,                  \
                NcbiEmptyCStr, GRID_WORKER_APP_NAME);                       \
    }

Definition at line 201 of file grid_worker_app.hpp.


Typedef Documentation

Deprecated:
Use GetGridClient() instead.

Definition at line 317 of file grid_client.hpp.

Deprecated:
Use GetGridClient() instead.

Definition at line 314 of file grid_client.hpp.

Definition at line 778 of file netschedule_api.hpp.

Definition at line 115 of file grid_cgiapp.hpp.

Definition at line 100 of file cgi2rcgi.cpp.


Enumeration Type Documentation

anonymous enum [private]
Enumerator:
eUseQueryString 
eUseRequestContent 

Definition at line 305 of file cgi2rcgi.cpp.

Enumerator:
eAutomaticCleanup 
eManualCleanup 

Definition at line 120 of file grid_client.hpp.

Error types that an application can generate.

Each derived class has its own error codes and their interpretations. Define two generic error codes "eInvalid" and "eUnknown" to be used by all NCBI applications.

Enumerator:
eBatchAlreadySubmitted 

Reimplemented from CException.

Definition at line 324 of file grid_client.hpp.

enum CCgi2RCgiApp::EJobPhase [private]
Enumerator:
ePending 
eRunning 
eTerminated 

Definition at line 287 of file cgi2rcgi.cpp.

Enumerator:
eProgressMsgOn 
eProgressMsgOff 

Definition at line 125 of file grid_client.hpp.


Function Documentation

void CGridClient::CancelJob ( const string job_key)

Cancel Job.

Parameters:
job_keyJob key

Definition at line 82 of file grid_client.cpp.

References CNetScheduleSubmitter::CancelJob(), and CGridClient::m_NetScheduleSubmitter.

Referenced by CGridCgiApplication::ProcessRequest(), and CCgi2RCgiApp::ProcessRequest().

CGridCgiContext::CGridCgiContext ( CHTMLPage page,
CHTMLPage custom_http_header,
CCgiContext ctx 
)

A copy constructor and an assignment operator are prohibited.

CGridClient::CGridClient ( CNetScheduleSubmitter::TInstance  ns_submitter,
IBlobStorage storage,
ECleanUp  cleanup,
EProgressMsg  progress_msg 
)

Constructor.

Parameters:
ns_clientNetSchedule client - an instance of CNetScheduleSubmitter.
storageNetSchedule storage
cleanupif true the grid client will automatically remove a job's input data from a storage when the job is done or canceled

Definition at line 45 of file grid_client.cpp.

References CGridClient::Init().

CGridClient::CGridClient ( CNetScheduleSubmitter::TInstance  ns_submitter,
CNetCacheAPI::TInstance  nc_client,
ECleanUp  cleanup,
EProgressMsg  progress_msg 
)

Constructor.

Parameters:
ns_clientNetSchedule client - an instance of CNetScheduleSubmitter.
nc_clientNetCache client - an instance of CNetCacheAPI.
cleanupif true the grid client will automatically remove a job's input data from a storage when the job is done or canceled

Definition at line 56 of file grid_client.cpp.

References CGridClient::Init().

The copy constructor and the assignment operator are prohibited.

CGridJobBatchSubmitter::CGridJobBatchSubmitter ( CGridClient grid_client) [explicit, private]

Definition at line 241 of file grid_client.cpp.

The copy constructor and the assignment operator are prohibited.

void CGridCgiContext::Clear ( void  ) [private]

Remove all persisted entries from cookie and self url.

Definition at line 246 of file cgi2rcgi.cpp.

References map_checker< Container >::clear(), and CGridCgiContext::m_PersistentEntries.

Referenced by CGridCgiApplication::ProcessRequest(), and CCgi2RCgiApp::ProcessRequest().

virtual bool CGridCgiApplication::CollectParams ( CGridCgiContext ctx) [protected, pure virtual]

Collect parameters from HTML form If this method returns false that means that input parameters were not specified (or were incorrect).

In this case method ShowParamsPage will be called.

Implemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Referenced by CGridCgiApplication::ProcessRequest().

CCgiContext * CCgi2RCgiApp::CreateContextWithFlags ( CNcbiArguments args,
CNcbiEnvironment env,
CNcbiIstream inp,
CNcbiOstream out,
int  ifd,
int  ofd,
int  flags 
) [virtual]

Definition at line 536 of file cgi2rcgi.cpp.

void CGridCgiContext::DefinePersistentEntry ( const string entry_name,
const string value 
)
void CCgi2RCgiApp::DefineRefreshTags ( const string url,
int  delay 
) [private]
void g_AppendClientIPAndSessionID ( string cmd,
const string default_session = NULL 
)
void g_AppendClientIPSessionIDHitID ( string cmd,
const string default_session = NULL 
)

Definition at line 91 of file netschedule_api.cpp.

References g_AppendClientIPAndSessionID(), and g_AppendHitID().

Referenced by CNetScheduleAdmin::CancelAllJobs(), CNetScheduleSubmitter::CancelJobGroup(), CExecAndParseStructuredOutput::CExecAndParseStructuredOutput(), CNetScheduleExecutor::ChangePreferredAffinities(), SNetScheduleExecutorImpl::ClaimNewPreferredAffinity(), CNetScheduleNotificationHandler::CmdAppendTimeoutGroupAndClientInfo(), CNetScheduleAdmin::CreateQueue(), CNetScheduleAdmin::DeleteQueue(), CNetScheduleAdmin::DumpJob(), CNetScheduleAdmin::DumpQueue(), SNetScheduleSubmitterImpl::FinalizeRead(), g_ResumeNetSchedule(), g_SuspendNetSchedule(), CNetScheduleExecutor::GetJob(), CNetScheduleAdmin::GetQueueList(), CNetScheduleAPI::GetQueueParams(), SNetScheduleAPIImpl::GetServerParams(), CNetScheduleAdmin::GetWorkerNodes(), CNetScheduleExecutor::JobDelayExpiration(), SNetScheduleExecutorImpl::MkSETAFFCmd(), CNetScheduleAdmin::PrintConf(), CNetScheduleAdmin::PrintHealth(), CNetScheduleAdmin::PrintServerStatistics(), CNetScheduleAdmin::PrintServerVersion(), CNetScheduleExecutor::PutFailure(), CNetScheduleExecutor::PutProgressMsg(), CNetScheduleExecutor::PutResult(), CNetScheduleSubmitter::Read(), CNetScheduleAdmin::ReloadServerConfig(), CNetScheduleNotificationHandler::RequestJob(), CNetScheduleNotificationHandler::RequestJobWatching(), CNetScheduleExecutor::Reschedule(), CNetScheduleExecutor::ReturnJob(), s_MkQINFCmd(), CNetScheduleServerListener::SetAuthString(), CNetScheduleAdmin::ShutdownServer(), SQueueInfoToJson::SQueueInfoToJson(), CNetScheduleAdmin::StatusSnapshot(), CNetScheduleAdmin::SwitchToDrainMode(), SNetScheduleAPIImpl::x_ClearNode(), SNetScheduleAPIImpl::x_ExecOnce(), and SNetScheduleJobReaderImpl::x_ReadJob().

void g_AppendHitID ( string cmd)
int g_ParseNSOutput ( const string attr_string,
const char *const attr_names,
string attr_values,
int  attr_count 
)
string CNetScheduleKeyGenerator::Generate ( unsigned  id) const [inline]

Definition at line 92 of file grid_client.hpp.

Referenced by CNSSubmitRemoteJobApp::Run().

size_t CGridClient::GetBlobSize ( ) const [inline]

Get the size of an input stream.

Definition at line 201 of file grid_client.hpp.

Referenced by CCgiTunnel2Grid::OnJobDone(), and CCgi2RCgiApp::OnJobDone().

virtual const char* CGridClientException::GetErrCodeString ( void  ) const [inline, virtual]

Get error code interpreted as text.

Reimplemented from CException.

Definition at line 328 of file grid_client.hpp.

References CGridClientException::eBatchAlreadySubmitted, and CException::GetErrCode().

CGridClient& CGridCgiApplication::GetGridClient ( void  ) [inline, protected]

Get a Grid Client.

Definition at line 258 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::ProcessRequest(), and CGridCgiApplication::x_CheckJobStatus().

Definition at line 106 of file grid_cgiapp.hpp.

Referenced by CCgiTunnel2Grid::OnJobFailed().

Get Current job key.

Definition at line 99 of file grid_cgiapp.cpp.

References CGridCgiContext::GetEntryValue().

Definition at line 107 of file grid_cgiapp.hpp.

Referenced by CCgiTunnel2Grid::OnJobFailed().

Get a job's output string.

This string can be used in two ways. 1. It can be an output data from a remote job (if that data is short) If it is so don't use GetIStream method. 2. It holds a key to a data stored in an external data storage. (NetCache) In this case use GetIStream method to get a stream with a job's result.

Definition at line 376 of file grid_client.cpp.

References CGridClient::m_Job, CNetScheduleJob::output, and CGridClient::x_GetJobDetails().

Referenced by CRemoteAppClientSampleApp::PrintJobInfo(), and CGridCgiApplication::x_CheckJobStatus().

Get current job progress message.

Definition at line 86 of file grid_cgiapp.hpp.

Referenced by CGridCgiSampleApplication::OnJobRunning(), and CCgiTunnel2Grid::OnJobRunning().

Get a job status checker.

Deprecated:
Use SetJobKey() and the CGridClient object itself instead.
Parameters:
job_keyJob key

Definition at line 254 of file grid_client.hpp.

Get a job submitter.

Deprecated:
Use the CGridClient object itself instead.

Definition at line 164 of file grid_client.hpp.

virtual string CGridCgiApplication::GetPageTemplate ( void  ) const [protected, pure virtual]

Return a name of a file this HTML page template.

It is used when an instance of CHTMLPage class is created.

Implemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Referenced by CGridCgiApplication::ProcessRequest().

virtual string CGridCgiApplication::GetPageTitle ( void  ) const [protected, pure virtual]

Return page name.

It is used when an instance of CHTMLPage class is created.

Implemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Referenced by CGridCgiApplication::ProcessRequest().

const TPersistentEntries& CGridCgiContext::GetPersistentEntries ( ) const [inline]

Definition at line 105 of file cgi2rcgi.cpp.

References CGridCgiContext::m_PersistentEntries.

Referenced by CCgi2RCgiApp::ProcessRequest().

virtual string CGridClientApp::GetProgramVersion ( void  ) const [pure virtual]

Get program version (like: MyProgram v.

1.2.3)

Program version is passed to NetSchedule queue so queue controls versions and does not allow obsolete clients to connect and submit or execute jobs

Implemented in CNSSubmitRemoteJobApp, CGridClientSampleApp, and CRemoteAppClientSampleApp.

Referenced by CGridClientApp::Init().

virtual string CGridCgiApplication::GetProgramVersion ( void  ) const [pure virtual]

Get program version (like: MyProgram v.

1.2.3)

Program version is passed to NetSchedule queue so queue controls versions and does not allow obsolete clients to connect and submit or execute jobs

Implemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Referenced by CGridCgiApplication::InitGridClient().

void CGridCgiContext::GetQueryStringEntryValue ( const string entry_name,
string value 
) const
void CGridCgiContext::GetRequestEntryValue ( const string entry_name,
string value 
) const

Get a job's return code.

Definition at line 387 of file grid_client.cpp.

References CGridClient::m_Job, CNetScheduleJob::ret_code, and CGridClient::x_GetJobDetails().

void CGridClientApp::Init ( void  ) [virtual]
void CGridCgiApplication::Init ( void  ) [virtual]

This method is called on the CGI application initialization -- before starting to process a HTTP request or even receiving one.

If you decide to override it, remember to call CGridCgiApplication::Init().

Reimplemented from CCgiApplicationCached.

Reimplemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Definition at line 163 of file grid_cgiapp.cpp.

References CGridCgiApplication::InitGridClient().

void CCgi2RCgiApp::Init ( void  ) [virtual]

This method is called on the CGI application initialization -- before starting to process a HTTP request or even receiving one.

No HTTP request (or context) is available at the time of call.

If you decide to override it, remember to call CCgiApplication::Init().

Reimplemented from CCgiApplicationCached.

Definition at line 342 of file cgi2rcgi.cpp.

References CArgDescriptions::AddOptionalKey(), CGridClient::eAutomaticCleanup, CHTMLPlainText::eHTMLEncode, CHTMLPlainText::eJSONEncode, CGridClient::eManualCleanup, NStr::eMergeDelims, CHTMLPlainText::eNoEncode, CGridClient::eProgressMsgOff, CGridClient::eProgressMsgOn, IRegistry::eReturn, CArgDescriptions::eString, CCgi2RCgiApp::eUseQueryString, CCgi2RCgiApp::eUseRequestContent, CCgiRequest::fCaseInsensitiveArgs, CCgiRequest::fDoNotParseContent, CNcbiApplication::GetArguments(), IRegistry::GetBool(), CNcbiApplication::GetConfig(), IRegistry::GetInt(), IRegistry::GetString(), CNetScheduleAPI::GetSubmitter(), GRID_APP_VERSION_INFO, incs, kEmptyStr, CCgi2RCgiApp::m_AddJobIdToHeader, CCgi2RCgiApp::m_AffinityName, CCgi2RCgiApp::m_AffinitySetLimit, CCgi2RCgiApp::m_AffinitySource, CCgi2RCgiApp::m_CancelGoBackDelay, CCgi2RCgiApp::m_ContentType, CCgi2RCgiApp::m_DateFormat, CCgi2RCgiApp::m_ElapsedTimeFormat, CCgi2RCgiApp::m_FallBackDelay, CCgi2RCgiApp::m_FallBackUrl, CCgi2RCgiApp::m_FirstDelay, CCgi2RCgiApp::m_GridClient, CCgi2RCgiApp::m_HtmlIncs, CCgi2RCgiApp::m_HTMLPassThrough, CCgi2RCgiApp::m_HtmlTemplate, CCgi2RCgiApp::m_InterceptJQueryCallback, CCgi2RCgiApp::m_NetCacheAPI, CCgi2RCgiApp::m_NetScheduleAPI, CCgi2RCgiApp::m_RefreshDelay, CCgi2RCgiApp::m_TargetEncodeMode, CCgi2RCgiApp::m_Title, NCBI_THROW_FMT, CCgiApplication::RegisterDiagFactory(), auto_ptr< X >::release(), auto_ptr< X >::reset(), CNetScheduleAPI::SetProgramVersion(), CCgiApplication::SetRequestFlags(), CCgiApplication::SetupArgDescriptions(), CArgDescriptions::SetUsageContext(), and NStr::Tokenize().

void CGridClient::Init ( ECleanUp  cleanup,
EProgressMsg  progress_msg 
) [private]
bool CGridCgiApplication::IsCachingNeeded ( const CCgiRequest request) const [private, virtual]
virtual bool CGridCgiApplication::JobStopRequested ( void  ) const [inline, protected, virtual]

When job is still running this method is called to check if cancel has been requested via the user interface(HTML).

If so the job will be canceled.

Reimplemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Definition at line 254 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::x_JobStopRequested().

int main ( int  argc,
const char *  argv[] 
)
NCBI_DECLARE_INTERFACE_VERSION ( SNetScheduleAPIImpl  ,
"xnetschedule_api"  ,
,
,
 
)
void NCBI_EntryPoint_xnetscheduleapi ( CPluginManager< SNetScheduleAPIImpl >::TDriverInfoList &  info_list,
CPluginManager< SNetScheduleAPIImpl >::EEntryPointRequest  method 
)
void CGridCgiContext::NeedRenderPage ( bool  value) [inline]

Definition at line 115 of file cgi2rcgi.cpp.

References CGridCgiContext::m_NeedRenderPage.

virtual void CGridCgiApplication::OnBeginProcessRequest ( CGridCgiContext ) [inline, protected, virtual]

This method is call at the very beginning of the request processing.

Reimplemented in CCgiTunnel2Grid.

Definition at line 233 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::ProcessRequest().

virtual void CGridCgiApplication::OnEndProcessRequest ( CGridCgiContext ) [inline, protected, virtual]

This method is call at the very end of the request processing.

Reimplemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Definition at line 229 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::ProcessRequest().

virtual void CGridCgiApplication::OnJobCanceled ( CGridCgiContext ctx) [inline, protected, virtual]

This method is called if job was canceled during its execution.

Override this message to show a job cancellation message.

Reimplemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Definition at line 215 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::x_CheckJobStatus().

virtual void CGridCgiApplication::OnJobDone ( CGridClient grid_client,
CGridCgiContext ctx 
) [protected, pure virtual]

This method is call when a worker node finishes its job and result is ready to be retrieved.

Override this method to get a result from a worker node and render a result HTML page

Implemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Referenced by CGridCgiApplication::x_CheckJobStatus().

void CCgi2RCgiApp::OnJobDone ( const string job_key,
CGridCgiContext ctx,
const string jquery_callback 
) [private]
virtual void CGridCgiApplication::OnJobFailed ( const string msg,
CGridCgiContext ctx 
) [inline, protected, virtual]

This method is called when worker node reported a failure.

Override this method to get a error message and render a error HTML page.

Reimplemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Definition at line 210 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::OnQueueIsBusy(), CGridCgiApplication::ProcessRequest(), and CGridCgiApplication::x_CheckJobStatus().

void CCgi2RCgiApp::OnJobFailed ( const string msg,
CGridCgiContext ctx 
) [private]
virtual void CGridCgiApplication::OnJobPending ( CGridCgiContext ctx) [inline, protected, virtual]

This method is call when a job is in NetSchedule queue and is waiting for a worker node.

Reimplemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Definition at line 225 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::x_CheckJobStatus().

virtual void CGridCgiApplication::OnJobRunning ( CGridCgiContext ctx) [inline, protected, virtual]

This method is call when a job is taken by a worker node to be processed.

Reimplemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Definition at line 220 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::x_CheckJobStatus().

virtual void CGridCgiApplication::OnJobSubmitted ( CGridCgiContext ctx) [inline, protected, virtual]

This method is called just after a job has been submitted.

Override this method to render information HTML page.

Reimplemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Definition at line 197 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::ProcessRequest().

void CGridCgiApplication::OnQueueIsBusy ( CGridCgiContext ctx) [protected, virtual]

This method is call when a job couldn't be submitted because of NetSchedule queue is full.

Reimplemented in CCgiTunnel2Grid.

Definition at line 209 of file grid_cgiapp.cpp.

References CGridCgiApplication::OnJobFailed().

Referenced by CGridCgiApplication::ProcessRequest().

CGridJobBatchSubmitter& CGridJobBatchSubmitter::operator= ( CGridJobBatchSubmitter ) [private]
CGridCgiContext& CGridCgiContext::operator= ( const CGridCgiContext ) [private]
CGridClient& CGridClient::operator= ( const CGridClient ) [private]
virtual void CGridCgiApplication::PrepareJobData ( CGridClient grid_client) [protected, pure virtual]

This method is called when a job is ready to be send to a the queue.

Override this method to prepare input data for the worker node.

Implemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Referenced by CGridCgiApplication::ProcessRequest().

Do not override this method yourself! -- it includes all the GRIDCGI specific machinery.

If you override it, do call CGridCgiApplication::ProcessRequest() from inside your overriding method.

Implements CCgiApplication.

Reimplemented in CCgiTunnel2Grid.

Definition at line 218 of file grid_cgiapp.cpp.

References CHTMLPage::AddTagMap(), CGridClient::CancelJob(), CGridCgiContext::Clear(), CGridCgiApplication::CollectParams(), eHTML, ERR_POST_X, CNetScheduleException::eTooManyPendingJobs, CGridCgiContext::GetEntryValue(), CException::GetErrCode(), CGridCgiApplication::GetGridClient(), CGridCgiContext::GetHiddenFields(), CGridCgiApplication::GetPageTemplate(), CGridCgiApplication::GetPageTitle(), CCgiContext::GetResponse(), CGridCgiContext::GetSelfURL(), CGridCgiApplication::m_FirstDelay, CGridCgiApplication::m_RefreshDelay, CGridCgiApplication::m_Response, CGridCgiContext::NeedRenderPage(), CGridCgiApplication::OnBeginProcessRequest(), CGridCgiApplication::OnEndProcessRequest(), CGridCgiApplication::OnJobFailed(), CGridCgiApplication::OnJobSubmitted(), CGridCgiApplication::OnQueueIsBusy(), CCgiResponse::out(), CGridCgiApplication::PrepareJobData(), CNCBINode::Print(), CGridCgiContext::PullUpPersistentEntry(), CGridCgiApplication::RenderRefresh(), auto_ptr< X >::reset(), CGridCgiContext::SetJobKey(), CGridCgiApplication::ShowParamsPage(), SleepMilliSec(), CGridClient::Submit(), CException::what(), CCgiResponse::WriteHeader(), CGridCgiApplication::x_CheckJobStatus(), and CGridCgiApplication::x_JobStopRequested().

int CCgi2RCgiApp::ProcessRequest ( CCgiContext context) [virtual]

This is the method you should override.

It is called whenever the CGI application gets a syntaxically valid HTTP request.

Parameters:
contextContains the parameters of the HTTP request
Returns:
Exit code; it must be zero on success

Implements CCgiApplication.

Definition at line 583 of file cgi2rcgi.cpp.

References CChecksum::AddChars(), CHTMLPage::AddTagMap(), CTime::AsString(), CTimeSpan::AsString(), map_checker< Container >::begin(), CGridClient::CancelJob(), CGridCgiContext::Clear(), crc32, CGridCgiContext::DefinePersistentEntry(), CCgi2RCgiApp::DefineRefreshTags(), eCgi_QueryString, CChecksum::eCRC32, CNCBINode::eHTML, CHTMLPlainText::eHTMLEncode, map_checker< Container >::end(), multimap_checker< Container >::end(), entries, CNetScheduleAPI::ePending, CCgi2RCgiApp::ePending, CNCBINode::ePlainText, multimap_checker< Container >::erase(), ERR_POST, CNetScheduleAPI::eRunning, CCgi2RCgiApp::eRunning, CCgi2RCgiApp::eTerminated, CNetScheduleException::eTooManyPendingJobs, CCgi2RCgiApp::eUseQueryString, CCgi2RCgiApp::eUseRequestContent, CDiagContext::Extra(), multimap_checker< Container >::find(), CNcbiEnvironment::Get(), auto_ptr< X >::get(), CCgiApplication::GetArgs(), CChecksum::GetChecksum(), CCgiRequest::GetContent(), GetDiagContext(), CCgiRequest::GetEntries(), CException::GetErrCode(), GetFastLocalTime(), CGridCgiContext::GetHTMLPage(), CGridClient::GetJob(), CGridClient::GetOStream(), CGridCgiContext::GetPersistentEntries(), CGridCgiContext::GetPersistentEntryValue(), CGridClient::GetProgressMessage(), CCgiRequest::GetPropertyName(), CGridCgiContext::GetQueryStringEntryValue(), CCgiContext::GetRequest(), CGridCgiContext::GetRequestEntryValue(), CCgiContext::GetResponse(), CGridCgiContext::GetSelfURL(), HTTP_NCBI_JSID, CNetScheduleJob::job_id, kEmptyStr, kGridCgiForm, kPlainTextView, kSinceTime, CGridCgiContext::LoadQueryStringTags(), CHTMLPage::LoadTemplateLibFile(), CCgi2RCgiApp::m_AddJobIdToHeader, CCgi2RCgiApp::m_AffinityName, CCgi2RCgiApp::m_AffinitySetLimit, CCgi2RCgiApp::m_AffinitySource, CCgi2RCgiApp::m_ContentType, CCgi2RCgiApp::m_CustomHTTPHeader, CCgi2RCgiApp::m_DateFormat, CCgi2RCgiApp::m_ElapsedTimeFormat, CCgi2RCgiApp::m_FirstDelay, CCgi2RCgiApp::m_GridClient, CCgi2RCgiApp::m_HtmlIncs, CCgi2RCgiApp::m_HTMLPassThrough, CCgi2RCgiApp::m_HtmlTemplate, CCgi2RCgiApp::m_InterceptJQueryCallback, CCgi2RCgiApp::m_NetScheduleAPI, CCgi2RCgiApp::m_Page, CCgi2RCgiApp::m_RefreshDelay, CCgi2RCgiApp::m_Response, CCgi2RCgiApp::m_TargetEncodeMode, CCgi2RCgiApp::m_Title, CGridCgiContext::NeedRenderPage(), NStr::NumericToString(), CCgi2RCgiApp::OnJobFailed(), CCgiResponse::out(), out(), CNCBINode::Print(), CDiagContext_Extra::Print(), CGridCgiContext::PullUpPersistentEntry(), auto_ptr< X >::reset(), s_RemoveCallbackParameter(), CGridCgiContext::SelectView(), CCgiRequest::Serialize(), CNcbiEnvironment::Set(), CCgiResponse::SetContentType(), CNcbiApplication::SetEnvironment(), CCgiResponse::SetHeaderValue(), CGridClient::SetJobAffinity(), CGridCgiContext::SetJobProgressMessage(), CHTMLPage::SetTemplateString(), CTime::SetTimeT(), NStr::StringToInt(), CGridClient::SubmitAndWait(), NStr::TruncateSpaces(), NStr::UIntToString(), CNetScheduleAPI::UpdateAuthString(), CException::what(), CCgiResponse::WriteHeader(), and CCgi2RCgiApp::x_CheckJobStatus().

void CGridCgiContext::PullUpPersistentEntry ( const string entry_name,
string value 
)

Remove a data blob from the storage.

Parameters:
data_keyBlob key

Definition at line 86 of file grid_client.cpp.

References CNetCacheAPI::GetCompoundIDPool(), CNetCacheKey::IsValidKey(), CGridClient::m_NetCacheAPI, and CNetCacheAPI::Remove().

Referenced by CGridClient::GetStatus().

void CGridCgiApplication::RenderRefresh ( CHTMLPage page,
const string url,
int  delay 
) [protected]
unsigned s_GetRemainingSeconds ( const CDeadline deadline) [inline]
static void s_RemoveCallbackParameter ( string query_string) [static]

Definition at line 564 of file cgi2rcgi.cpp.

References CALLBACK_PARAM, NStr::Find(), and NPOS.

Referenced by CCgi2RCgiApp::ProcessRequest().

void CGridCgiContext::SelectView ( const string view_name)
void CGridClient::SetJobAffinity ( const string affinity) [inline]
void CGridClient::SetJobGroup ( const string group) [inline]

Set a job's input This string will be sent to then the job is submitted.

This method can be used to send a short data to the worker node. To send a large data use GetOStream method. Don't call this method after GetOStream method is called.

Definition at line 163 of file grid_client.cpp.

References CGridJobBatchSubmitter::CheckIfBatchSubmittedAndPrepareNextJob(), input(), CGridJobBatchSubmitter::m_JobIndex, and CGridJobBatchSubmitter::m_Jobs.

void CGridCgiContext::SetJobInput ( const string input) [inline, private]

Definition at line 121 of file grid_cgiapp.hpp.

References input().

Referenced by CGridCgiApplication::x_CheckJobStatus().

void CGridClient::SetJobInput ( const string input) [inline]

Set a job's input This string will be sent to then the job is submitted.

This method can be used to send a short data to the worker node. To send a large data use GetOStream method. Don't call this method after GetOStream method is called.

Definition at line 217 of file grid_client.hpp.

References input().

Referenced by CCgiTunnel2Grid::PrepareJobData().

void CGridCgiContext::SetJobKey ( const string job_key) [private]
void CGridClient::SetJobKey ( const string job_key)
void CGridCgiContext::SetJobOutput ( const string output) [inline, private]

Definition at line 122 of file grid_cgiapp.hpp.

References output.

Referenced by CGridCgiApplication::x_CheckJobStatus().

void CGridCgiContext::SetJobProgressMessage ( const string msg) [inline, private]

Register a listener of events of this class.

Note:
This object takes ownership over the listener object and will automatically 'delete' it.
Parameters:
listenerA pointer to the listener object. NULL can be passed to stop listening and reset the internal pointer to the default handler.

Definition at line 168 of file grid_worker_app.hpp.

References CGridWorkerApp::m_WorkerNode, and CGridWorkerNode::SetListener().

virtual void CGridCgiApplication::ShowParamsPage ( CGridCgiContext ctx) const [protected, pure virtual]

Show a page with input data.

Implemented in CCgiTunnel2Grid, and CGridCgiSampleApplication.

Referenced by CGridCgiApplication::ProcessRequest().

bool CRegexpTemplateFilter::TestAttribute ( const string attr_name,
const string test_pattern 
) [virtual]
bool CGridClientApp::UseAutomaticCleanup ( ) const [protected, virtual]

Reimplemented in CRemoteAppClientSampleApp, and CNSSubmitRemoteJobApp.

Definition at line 68 of file grid_client_app.cpp.

Referenced by CGridClientApp::Init().

bool CGridClientApp::UseProgressMessage ( ) const [protected, virtual]

Reimplemented in CRemoteAppClientSampleApp, and CGridClientSampleApp.

Definition at line 64 of file grid_client_app.cpp.

Referenced by CGridClientApp::Init().

CCgi2RCgiApp::EJobPhase CCgi2RCgiApp::x_CheckJobStatus ( CGridCgiContext grid_ctx,
const string jquery_callback 
) [private]
void CGridClient::x_GetJobDetails ( ) [private]
void CGridClient::x_ProlongBlobLifetime ( const string blob_key,
unsigned  ttl 
) [private]
bool CGridClient::x_ProlongJobFieldLifetime ( const string job_field,
unsigned  ttl 
) [private]
void CGridClient::x_RenewAllJobBlobs ( time_t  job_exptime) [private]

Definition at line 54 of file grid_cgiapp.cpp.


Variable Documentation

const string kGridCgiForm = "</FORM>" [static]

Definition at line 526 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::ProcessRequest().

const string kPlainTextView = "<@STAT_VIEW@>" [static]

Definition at line 531 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::ProcessRequest().

Definition at line 332 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::Init(), and CCgi2RCgiApp::ProcessRequest().

Definition at line 334 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::Init(), and CCgi2RCgiApp::ProcessRequest().

Definition at line 302 of file grid_client.hpp.

Referenced by CGridClient::GetStatus(), and CGridClient::Init().

size_t CGridClient::m_BlobSize [private]

Definition at line 320 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::Init(), and CCgi2RCgiApp::x_CheckJobStatus().

Definition at line 336 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::Init(), and CCgi2RCgiApp::ProcessRequest().

Definition at line 327 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::DefineRefreshTags(), and CCgi2RCgiApp::ProcessRequest().

Definition at line 321 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::Init(), and CCgi2RCgiApp::ProcessRequest().

Definition at line 322 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::Init(), and CCgi2RCgiApp::ProcessRequest().

Definition at line 319 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::Init(), and CCgi2RCgiApp::OnJobFailed().

Definition at line 297 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::Init(), and CCgi2RCgiApp::ProcessRequest().

Definition at line 78 of file grid_client_app.hpp.

Referenced by CGridClientApp::Init(), and CNSSubmitRemoteJobApp::Run().

Definition at line 275 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::InitGridClient().

Definition at line 330 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::Init(), and CCgi2RCgiApp::ProcessRequest().

Definition at line 329 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::Init(), and CCgi2RCgiApp::ProcessRequest().

Definition at line 323 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::Init(), and CCgi2RCgiApp::ProcessRequest().

Definition at line 294 of file grid_client.hpp.

Referenced by CGridClient::GetJobBatchSubmitter(), and CGridClient::Init().

Definition at line 130 of file grid_cgiapp.hpp.

Definition at line 131 of file grid_cgiapp.hpp.

Definition at line 274 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::InitGridClient().

Definition at line 300 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::Init().

Definition at line 287 of file grid_client.hpp.

Referenced by CGridClient::CancelJob(), and CGridClient::GetMaxServerInputSize().

Definition at line 273 of file grid_cgiapp.hpp.

Referenced by CGridCgiApplication::InitGridClient().

Definition at line 326 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::DefineRefreshTags(), and CCgi2RCgiApp::ProcessRequest().

Definition at line 542 of file cgi2rcgi.cpp.

Referenced by CRegexpTemplateFilter::TestAttribute().

TPersistedEntries CGridCgiContext::m_PersistedEntries [private]
TPersistentEntries CGridCgiContext::m_PersistentEntries [private]

Definition at line 296 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::Init(), and CCgi2RCgiApp::ProcessRequest().

Definition at line 302 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::DefineRefreshTags(), and CCgi2RCgiApp::ProcessRequest().

Definition at line 304 of file grid_client.hpp.

Referenced by CGridClient::GetIStream(), and CGridClient::SetJobKey().

Definition at line 317 of file cgi2rcgi.cpp.

Referenced by CCgi2RCgiApp::Init(), and CCgi2RCgiApp::ProcessRequest().

Definition at line 291 of file grid_client.hpp.

Referenced by CGridClient::CloseStream(), and CGridClient::GetOStream().

Definition at line 292 of file grid_client.hpp.

Referenced by CGridClient::CloseStream(), and CGridClient::GetOStream().


Friends

friend class CGridCgiApplication [friend]

Definition at line 117 of file grid_cgiapp.hpp.

friend class CGridClient [friend]

Only CGridClient can create an instance of this class.

Definition at line 95 of file grid_client.hpp.

Modified on Sun Nov 23 14:53:52 2014 by modify_doxy.py rev. 426318