1 #ifndef __GRID_CGIAPP_HPP
2 #define __GRID_CGIAPP_HPP
79 string GetSelfURL(
void)
const;
83 const string& GetJobKey(
void)
const;
87 {
return m_ProgressMsg; }
91 const string& GetEntryValue(
const string& entry_name)
const;
94 void PullUpPersistentEntry(
const string& entry_name);
95 void DefinePersistentEntry(
const string& entry_name,
const string&
value);
104 string GetHiddenFields()
const;
118 void SetJobKey(
const string& job_key);
120 { m_ProgressMsg =
msg; }
160 virtual void Init(
void);
262 void InitGridClient();
268 virtual bool IsCachingNeeded(
const CCgiRequest& request)
const;
Grid CGI Context Context in which a request is processed.
Grid Client (the submitter).
Client API for NetCache server.
Client API for NCBI NetSchedule server.
static SQLCHAR output[256]
NetSchedule Framework specs.
CCgiContext & m_CgiContext
CGridCgiContext(const CGridCgiContext &)
A copy constructor and an assignment operator are prohibited.
TPersistedEntries m_PersistedEntries
TCgiEntries m_ParsedQueryString
virtual void OnJobCanceled(CGridCgiContext &)
This method is called if job was canceled during its execution.
void SetJobProgressMessage(const string &msg)
virtual void PrepareJobData(CGridClient &grid_client)=0
This method is called when a job is ready to be send to a the queue.
CHTMLPage & GetHTMLPage(void)
Get an HTML page.
void SetJobInput(const string &input)
virtual void OnBeginProcessRequest(CGridCgiContext &)
This method is call at the very beginning of the request processing.
virtual bool JobStopRequested(void) const
When job is still running this method is called to check if cancel has been requested via the user in...
virtual string GetPageTitle(void) const =0
Return page name.
const string & GetJobInput() const
CCgiContext & GetCGIContext()
Get CGI Context.
virtual void OnJobPending(CGridCgiContext &)
This method is call when a job is in NetSchedule queue and is waiting for a worker node.
virtual void 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.
unique_ptr< CGridClient > m_GridClient
virtual void ShowParamsPage(CGridCgiContext &ctx) const =0
Show a page with input data.
CCgiResponse * m_Response
virtual void OnJobRunning(CGridCgiContext &)
This method is call when a job is taken by a worker node to be processed.
bool NeedRenderPage() const
const string & GetJobOutput() const
virtual bool CollectParams(CGridCgiContext &ctx)=0
Collect parameters from HTML form If this method returns false that means that input parameters were ...
CGridClient & GetGridClient(void)
Get a Grid Client.
const string & GetJobProgressMessage(void) const
Get current job progress message.
virtual void OnJobSubmitted(CGridCgiContext &)
This method is called just after a job has been submitted.
virtual void OnJobFailed(const string &, CGridCgiContext &)
This method is called when worker node reported a failure.
virtual string GetProgramVersion(void) const =0
Get program version (like: MyProgram v.
CGridCgiContext & operator=(const CGridCgiContext &)
virtual void OnEndProcessRequest(CGridCgiContext &)
This method is call at the very end of the request processing.
void SetJobOutput(const string &output)
CNetScheduleAPI m_NSClient
virtual string GetPageTemplate(void) const =0
Return a name of a file this HTML page template.
map< string, string > TPersistedEntries
CNetCacheAPI m_NetCacheAPI
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
#define NCBI_XGRIDCGI_EXPORT
const GenericPointer< typename T::ValueType > T2 value
Miscellaneous common-use basic types and functionality.
NetSchedule client specs.
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)