.TH "globus_gram_client_job_functions" 3 "Version 14.6" "globus_gram_client" \" -*- nroff -*- .ad l .nh .SH NAME globus_gram_client_job_functions \- GRAM Job Functions .PP \- GRAM Job Functions\&. .SH SYNOPSIS .br .PP .SS "Functions" .in +1c .ti -1c .RI "int \fBglobus_gram_client_register_ping\fP (const char *resource_manager_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void *register_callback_arg)" .br .RI "Send a ping request to a GRAM service\&. " .ti -1c .RI "int \fBglobus_gram_client_ping\fP (const char *resource_manager_contact)" .br .RI "Send a ping request to a GRAM service\&. " .ti -1c .RI "int \fBglobus_gram_client_get_jobmanager_version\fP (const char *resource_manager_contact, globus_hashtable_t *extensions)" .br .RI "Get version information from a job manager\&. " .ti -1c .RI "int \fBglobus_gram_client_register_get_jobmanager_version\fP (const char *resource_manager_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_info_callback_func_t\fP info_callback, void *callback_arg)" .br .RI "Get version information from a job manager without blocking\&. " .ti -1c .RI "int \fBglobus_gram_client_register_job_request\fP (const char *resource_manager_contact, const char *description, int job_state_mask, const char *callback_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void *register_callback_arg)" .br .RI "Send a job request to a GRAM service\&. " .ti -1c .RI "int \fBglobus_gram_client_job_request\fP (const char *resource_manager_contact, const char *description, int job_state_mask, const char *callback_contact, char **job_contact)" .br .RI "Send a job request to a GRAM service\&. " .ti -1c .RI "int \fBglobus_gram_client_register_job_request_with_info\fP (const char *resource_manager_contact, const char *description, int job_state_mask, const char *callback_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_info_callback_func_t\fP callback, void *callback_arg)" .br .RI "Send a job request to a GRAM service with extensions-aware callback\&. " .ti -1c .RI "int \fBglobus_gram_client_job_request_with_info\fP (const char *resource_manager_contact, const char *description, int job_state_mask, const char *callback_contact, char **job_contact, \fBglobus_gram_client_job_info_t\fP *info)" .br .RI "Send a job request to a GRAM service and parse extensions in the response\&. " .ti -1c .RI "int \fBglobus_gram_client_job_cancel\fP (const char *job_contact)" .br .RI "Cancel a GRAM job\&. " .ti -1c .RI "int \fBglobus_gram_client_register_job_cancel\fP (const char *job_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void *register_callback_arg)" .br .RI "Cancel a GRAM job\&. " .ti -1c .RI "int \fBglobus_gram_client_job_signal\fP (const char *job_contact, globus_gram_protocol_job_signal_t signal, const char *signal_arg, int *job_status, int *failure_code)" .br .RI "Send a signal a GRAM job\&. " .ti -1c .RI "int \fBglobus_gram_client_register_job_signal\fP (const char *job_contact, globus_gram_protocol_job_signal_t signal, const char *signal_arg, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void *register_callback_arg)" .br .RI "Send a signal a GRAM job\&. " .ti -1c .RI "int \fBglobus_gram_client_job_status\fP (const char *job_contact, int *job_status, int *failure_code)" .br .RI "Send a status query to a GRAM job\&. " .ti -1c .RI "int \fBglobus_gram_client_register_job_status\fP (const char *job_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void *register_callback_arg)" .br .RI "Send a status query to a GRAM job\&. " .ti -1c .RI "int \fBglobus_gram_client_register_job_status_with_info\fP (const char *job_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_info_callback_func_t\fP info_callback, void *callback_arg)" .br .RI "Send a status query to a GRAM job\&. " .ti -1c .RI "int \fBglobus_gram_client_job_status_with_info\fP (const char *job_contact, \fBglobus_gram_client_job_info_t\fP *info)" .br .RI "Send a status query to a GRAM job\&. " .ti -1c .RI "int \fBglobus_gram_client_job_callback_register\fP (const char *job_contact, int job_state_mask, const char *callback_contact, int *job_status, int *failure_code)" .br .RI "Register a new callback contact to be notified for job state changes\&. " .ti -1c .RI "int \fBglobus_gram_client_job_callback_unregister\fP (const char *job_contact, const char *callback_contact, int *job_status, int *failure_code)" .br .RI "Unregister a callback contact to stop job state change notifications\&. " .ti -1c .RI "int \fBglobus_gram_client_job_refresh_credentials\fP (char *job_contact, gss_cred_id_t creds)" .br .RI "Delegate a new credential to a job\&. " .ti -1c .RI "int \fBglobus_gram_client_register_job_refresh_credentials\fP (char *job_contact, gss_cred_id_t creds, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void *register_callback_arg)" .br .RI "Delegate a new credential to a job\&. " .ti -1c .RI "int \fBglobus_gram_client_register_job_callback_registration\fP (const char *job_contact, int job_state_mask, const char *callback_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void *register_callback_arg)" .br .RI "Register a new callback contact to be notified for job state changes\&. " .ti -1c .RI "int \fBglobus_gram_client_register_job_callback_unregistration\fP (const char *job_contact, const char *callback_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void *register_callback_arg)" .br .RI "Unregister a callback contact to stop job state change notifications\&. " .in -1c .SH "Detailed Description" .PP GRAM Job Functions\&. .SH "Function Documentation" .PP .SS "int globus_gram_client_get_jobmanager_version (const char * resource_manager_contact, globus_hashtable_t * extensions)" .PP Get version information from a job manager\&. The \fBglobus_gram_client_get_jobmanager_version()\fP function sends a message to a GRAM service which returns information about the job manager version in the value pointed to by the \fIextensions\fP parameter\&. Note that job managers prior to GT5 do not support the version request and so will return a GLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED error\&. This function blocks while processing this request\&. .PP \fBParameters\fP .RS 4 \fIresource_manager_contact\fP A NULL-terminated character string containing a \fBGRAM contact\fP\&. .br \fIextensions\fP A pointer to a hash table which will be initialized to contain the version information returned by the service\&. The extensions defined by GRAM5 are \fItoolkit-version\fP and \fIversion\fP\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_client_get_jobmanager_version()\fP function returns GLOBUS_SUCCESS and modifies the \fIextensions\fP parameter as described above\&. If an error occurs, the integer error code will be returned and the value pointed to by the \fIextensions\fP parameter is undefined\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_BAD_GATEKEEPER_CONTACT\fP Bad gatekeeper contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER\fP NULL parameter .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol failed .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP .SS "int globus_gram_client_job_callback_register (const char * job_contact, int job_state_mask, const char * callback_contact, int * job_status, int * failure_code)" .PP Register a new callback contact to be notified for job state changes\&. The \fBglobus_gram_client_job_callback_register()\fP function contacts a GRAM service managing a job and instructs it to send subsequent job state callbacks to the client listening for callbacks at the contact url named by the \fIcallback_contact\fP parameter\&. This function blocks until the registration operation either completes or exits\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP The job contact string of the job to contact\&. This is the same value returned from \fBglobus_gram_client_job_request()\fP\&. .br \fIjob_state_mask\fP A bitwise-or of the GLOBUS_GRAM_PROTOCOL_JOB_STATE_* states that the job manager will send job state notification messages for to the contact named by \fIcallback_contact\fP\&. .br \fIcallback_contact\fP A URL string containing a GRAM client callback\&. This string is normally be generated by a process calling \fBglobus_gram_client_callback_allow()\fP\&. .br \fIjob_status\fP An output parameter pointing to an integer to set to the status of the job after the registration message has been processed\&. .br \fIfailure_code\fP An output parameter that points to an integer to be set to the reason why the job failed if its current status is \fIGLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED\fP\&. If the job has not failed, the value will be set to 0\&. .RE .PP \fBReturns\fP .RS 4 Upon success, the \fBglobus_gram_client_job_callback_register()\fP function returns \fIGLOBUS_SUCCESS\fP, sends a registration request the job named by \fIjob_contact\fP and parses the service response, modifying the values pointed to by the \fIjob_status\fP and \fIfailure_code\fP parameters as described above\&. If an error occurs, \fBglobus_gram_client_job_callback_register()\fP returns an integer error code indicating why it can't register the callback contact\&. The return code may be any value defined by the \fIglobus_gram_protocol_error_t\fP enumeration in addition to those listed below\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_GRAM_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP .SS "int globus_gram_client_job_callback_unregister (const char * job_contact, const char * callback_contact, int * job_status, int * failure_code)" .PP Unregister a callback contact to stop job state change notifications\&. The \fBglobus_gram_client_job_callback_unregister()\fP function contacts a GRAM service managing a job and instructs it to stop sending job state callbacks to the client listening for callbacks at the contact url named by the \fIcallback_contact\fP parameter\&. This function blocks until the unregistration operation either completes or exits\&. It is possible that callbacks related to the job arrive at the contact after this function returns depending on network delays\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP The job contact string of the job to contact\&. This is the same value returned from \fBglobus_gram_client_job_request()\fP\&. .br \fIcallback_contact\fP A URL string containing a GRAM client callback\&. This string is normally be generated by a process calling \fBglobus_gram_client_callback_allow()\fP\&. .br \fIjob_status\fP An output parameter pointing to an integer to set to the status of the job after the registration message has been processed\&. .br \fIfailure_code\fP An output parameter that points to an integer to be set to the reason why the job failed if its current status is \fIGLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED\fP\&. If the job has not failed, the value will be set to 0\&. .RE .PP \fBReturns\fP .RS 4 Upon success, the \fBglobus_gram_client_job_callback_unregister()\fP function returns \fIGLOBUS_SUCCESS\fP, sends an unregister request the job named by \fIjob_contact\fP and parses the service response, modifying the values pointed to by the \fIjob_status\fP and \fIfailure_code\fP parameters as described above\&. If an error occurs, \fBglobus_gram_client_job_callback_unregister()\fP returns an integer error code indicating why it can't unregister the callback contact\&. The return code may be any value defined by the \fIglobus_gram_protocol_error_t\fP enumeration in addition to those listed below\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_GRAM_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP .SS "int globus_gram_client_job_cancel (const char * job_contact)" .PP Cancel a GRAM job\&. The \fBglobus_gram_client_job_cancel()\fP function cancels a GRAM job\&. Depending on the job's current state, this cancellation may be immediate or require a delay for interacting with the LRM servicing the job\&. Notification when the job has been successfully canceled will be sent to all client contacts registered for notifications after the cancellation has been completely processed\&. Unlike, \fBglobus_gram_client_register_job_cancel()\fP, \fBglobus_gram_client_job_cancel()\fP blocks until the job cancel request has been processed by the service\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP A NULL-terminated character string containing a GRAM job contact that this function will contact to cancel the job\&. .RE .PP \fBReturns\fP .RS 4 Upon succes, \fBglobus_gram_client_job_cancel()\fP returns \fIGLOBUS_SUCCESS\fP if the cancellation was successful posted to the service\&. If an error occurs, \fBglobus_gram_client_job_cancel()\fP returns one of the #globus_gram_protocol_error_t values values indicating why the client could not cancel the job\&. .RE .PP \fBSee also\fP .RS 4 \fBglobus_gram_client_register_job_cancel()\fP .RE .PP .SS "int globus_gram_client_job_refresh_credentials (char * job_contact, gss_cred_id_t creds)" .PP Delegate a new credential to a job\&. The \fBglobus_gram_client_job_refresh_credentials()\fP function sends a 'renew' signal to a GRAM service and then initiates the delegation of a new credential to the job manager and job\&. This prevents errors that can occur when a credential expires\&. This function blocks until the delegation has completed or failed\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP The job contact string of the job to contact\&. This is the same value returned from \fBglobus_gram_client_job_request()\fP\&. .br \fIcreds\fP A GSSAPI credential handle which will be used to authenticate with the job manager and sign the delegated credential\&. This parameter's value may be set to \fIGSS_C_NO_CREDENTIAL\fP to indicate the desire to use this process's default credential\&. .RE .PP \fBReturns\fP .RS 4 Upon success, the \fBglobus_gram_client_job_refresh_credentials()\fP function returns \fIGLOBUS_SUCCESS\fP, sends an proxy renew request the job named by \fIjob_contact\fP, parses the service response and performs a GSSAPI delegation to send a new credential to the job service\&. If an error occurs, \fBglobus_gram_client_job_refresh_credentials()\fP returns an integer error code indicating why it can't refresh the job service's credential\&. The return code may be any value defined by the \fIglobus_gram_protocol_error_t\fP enumeration in addition to those listed below\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_GRAM_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP .SS "int globus_gram_client_job_request (const char * resource_manager_contact, const char * description, int job_state_mask, const char * callback_contact, char ** job_contact)" .PP Send a job request to a GRAM service\&. The \fBglobus_gram_client_job_request()\fP function sends a GRAM protocol message to a service to request that it start a job on behalf of the client\&. Unlike, \fBglobus_gram_client_register_job_request()\fP, \fBglobus_gram_client_job_request()\fP blocks until the job request has been processed by the service\&. .PP \fBParameters\fP .RS 4 \fIresource_manager_contact\fP A NULL-terminated character string containing a \fBGRAM contact\fP that this function will contact\&. .br \fIdescription\fP A pointer to a string containing the job request information formatted in RSL syntax\&. .br \fIjob_state_mask\fP A bitwise-or of the GLOBUS_GRAM_PROTOCOL_JOB_STATE_* states that the job manager will send job state notification messages for to the contact named by \fIcallback_contact\fP\&. .br \fIcallback_contact\fP A GRAM listener contact that the job manager will send job state notification messages to\&. .br \fIjob_contact\fP An output parameter pointing to a string that will be set to the job contact for this job\&. This value will only be set if the job request is successful or the two-phase commit protocol is being used and the return code is \fIGLOBUS_GRAM_PROTOCOL_ERROR_WAITING_FOR_COMMIT\fP\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_client_job_request()\fP returns GLOBUS_SUCCESS and modifies the value pointed to by \fIjob_contact\fP as described above\&. If an error occurs, this function returns an integer error code and the value pointed to by \fIjob_contact\fP\&. In addition to the error codes described below, any #globus_gram_protocol_error_t value may be returned as a cause for the job to fail\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP .SS "int globus_gram_client_job_request_with_info (const char * resource_manager_contact, const char * description, int job_state_mask, const char * callback_contact, char ** job_contact, \fBglobus_gram_client_job_info_t\fP * info)" .PP Send a job request to a GRAM service and parse extensions in the response\&. The \fBglobus_gram_client_job_request_with_info()\fP function sends a GRAM protocol message to a service to request that it start a job on behalf of the client\&. Unlike, \fBglobus_gram_client_register_job_request_with_info()\fP, \fBglobus_gram_client_job_request_with_info()\fP blocks until the job request has been processed by the service\&. .PP \fBParameters\fP .RS 4 \fIresource_manager_contact\fP A NULL-terminated character string containing a \fBGRAM contact\fP that this function will contact\&. .br \fIdescription\fP A pointer to a string containing the job request information formatted in RSL syntax\&. .br \fIjob_state_mask\fP A bitwise-or of the GLOBUS_GRAM_PROTOCOL_JOB_STATE_* states that the job manager will send job state notification messages for to the contact named by \fIcallback_contact\fP\&. .br \fIcallback_contact\fP A GRAM listener contact that the job manager will send job state notification messages to\&. .br \fIjob_contact\fP An output parameter pointing to a string that will be set to the job contact for this job\&. This value will only be set if the job request is successful or the two-phase commit protocol is being used and the return code is \fIGLOBUS_GRAM_PROTOCOL_ERROR_WAITING_FOR_COMMIT\fP\&. .br \fIinfo\fP An output parameter pointing to a structure to hold the extensions in the GRAM response\&. The caller is responsible for destroying this by calling the \fBglobus_gram_client_job_info_destroy()\fP function\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_client_job_request_with_info()\fP returns GLOBUS_SUCCESS and modifies the values pointed to by \fIjob_contact\fP and \fIinfo\fP as described above\&. If an error occurs, this function returns an integer error code and the value pointed to by \fIjob_contact\fP\&. In addition to the error codes described below, any #globus_gram_protocol_error_t value may be returned as a cause for the job to fail\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP .SS "int globus_gram_client_job_signal (const char * job_contact, globus_gram_protocol_job_signal_t signal, const char * signal_arg, int * job_status, int * failure_code)" .PP Send a signal a GRAM job\&. The \fBglobus_gram_client_job_signal()\fP function sends a signal message to a job managed by the GRAM service\&. Signals consist of a signal number and an optional string argument\&. The meanings of the signals supported by the GRAM job manager are defined in the GRAM Protocol documentation\&. Unlike \fBglobus_gram_client_register_job_signal()\fP, this function blocks until the signal has been delivered and acknowledged by the GRAM service\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP The job contact string of the job manager to contact\&. This is the same value returned from \fBglobus_gram_client_job_request()\fP\&. .br \fIsignal\fP The signal code to send to the job manager\&. .br \fIsignal_arg\fP Parameters for the signal, as described in the documentation for the #globus_gram_protocol_job_signal_t enumeration\&. .br \fIjob_status\fP An output parameter pointing to an integer to set to the status of the job after the signal has been processed\&. .br \fIfailure_code\fP An output parameter pointing to an integer to set to the reason why the job has failed if the value pointed to by \fIjob_status\fP is set to \fIGLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED\fP by this function\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_client_job_signal()\fP returns GLOBUS_SUCCESS after sending the signal and receiving a response and modifies the \fIjob_status\fP and \fIfailure_code\fP parameters as described above\&. If an error occurs, this function returns an integer error code indicating why the client could not signal the job\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_GRAM_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP \fBSee also\fP .RS 4 \fBglobus_gram_client_register_job_signal()\fP .RE .PP .SS "int globus_gram_client_job_status (const char * job_contact, int * job_status, int * failure_code)" .PP Send a status query to a GRAM job\&. The globus_gram_client_status() function queries the current status of the job associated with the job contact, returning its current status, as well as the job's failure reason if it has failed in this function's return parameters\&. This function blocks until the service has responded to the status query\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP The job contact string of the job to query\&. This is the same value returned from \fBglobus_gram_client_job_request()\fP\&. .br \fIjob_status\fP An output parameter that points to an integer to be set to the current status of the job named by the \fIjob_contact\fP parameter\&. .br \fIfailure_code\fP An output parameter that points to an integer to be set to the reason why the job failed if its current status is \fIGLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED\fP\&. If the job has not failed, the value will be set to 0\&. .RE .PP \fBReturns\fP .RS 4 Upon success, the \fBglobus_gram_client_job_status()\fP function returns \fIGLOBUS_SUCCESS\fP, sends a job state query to the job named by \fIjob_contact\fP and parses the service response, modifying the values pointed to by \fIjob_status\fP and \fIfailure_code\fP as described above\&. If an error occurs, \fBglobus_gram_client_job_status()\fP returns an integer error code\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_GRAM_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP .SS "int globus_gram_client_job_status_with_info (const char * job_contact, \fBglobus_gram_client_job_info_t\fP * info)" .PP Send a status query to a GRAM job\&. The globus_gram_client_status_with_info() function queries the current status of the job associated with the job contact, returning its current status, as well as the job's failure reason if it has failed in this function's return parameters\&. This function blocks until the service has responded to the status query\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP The job contact string of the job to query\&. This is the same value returned from \fBglobus_gram_client_job_request()\fP\&. .br \fIinfo\fP An output parameter that points to a globus_gram_client_job_info_t structure which will be populated with the state information associated with the job named by the \fIjob_contact\fP parameter\&. The caller is responsible for calling \fBglobus_gram_client_job_info_destroy()\fP to free the state pointed to by this parameter if this function returns \fIGLOBUS_SUCCESS\fP\&. .RE .PP \fBReturns\fP .RS 4 Upon success, the \fBglobus_gram_client_job_status_with_info()\fP function returns \fIGLOBUS_SUCCESS\fP, sends a job state query to the job named by \fIjob_contact\fP and parses the service response, modifying the structure pointed to by \fIinfo\fP as described above\&. If an error occurs, \fBglobus_gram_client_job_status_with_info()\fP returns an integer error code\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_GRAM_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP .SS "int globus_gram_client_ping (const char * resource_manager_contact)" .PP Send a ping request to a GRAM service\&. The \fBglobus_gram_client_ping()\fP function sends a specially-formatted GRAM protocol message which checks to see if a Gatekeeper is running on a given PORT, and whether that Gatekeeper is configured to support the desired job manager service\&. This is used for diagnostic purposes\&. .PP \fBParameters\fP .RS 4 \fIresource_manager_contact\fP A NULL-terminated character string containing a \fBGRAM contact\fP that this function will contact\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_client_ping()\fP contacts the gatekeeper service and returns \fIGLOBUS_SUCCESS\fP\&. If an error occurs, this function returns an integer error code\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP .SS "int globus_gram_client_register_get_jobmanager_version (const char * resource_manager_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_info_callback_func_t\fP info_callback, void * callback_arg)" .PP Get version information from a job manager without blocking\&. The \fBglobus_gram_client_register_get_jobmanager_version()\fP function sends a message to a GRAM service which returns information about the job manager version to the function pointed to by the \fIinfo_callback\fP function\&. Note that job managers prior to GT5 do not support the version request and so will return a GLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED error\&. This function blocks while processing this request\&. .PP \fBParameters\fP .RS 4 \fIresource_manager_contact\fP A NULL-terminated character string containing a \fBGRAM contact\fP\&. .br \fIattr\fP A set of client attributes to use to contact the gatekeeper\&. If no custom attributes are needed, the caller should pass the value \fIGLOBUS_GRAM_CLIENT_NO_ATTR\fP\&. .br \fIinfo_callback\fP A pointer to a function to call when the version request has completed or failed\&. .br \fIcallback_arg\fP A pointer to application-specific data which will be passed to the function pointed to by \fIinfo_callback\fP as its \fIuser_callback_arg\fP parameter\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_client_register_get_jobmanager_version()\fP function returns GLOBUS_SUCCESS and begins processing the version request to contact \fIresource_manager_contact\fP; when complete, the \fIinfo_callback\fP function will be called\&. If an error occurs, the integer error code will be returned and the value pointed to by the \fIextensions\fP parameter is undefined\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_BAD_GATEKEEPER_CONTACT\fP Bad gatekeeper contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER\fP NULL parameter .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol failed .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP .SS "int globus_gram_client_register_job_callback_registration (const char * job_contact, int job_state_mask, const char * callback_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void * register_callback_arg)" .PP Register a new callback contact to be notified for job state changes\&. The \fBglobus_gram_client_register_job_callback_registration()\fP function initiates the protocol to contact a GRAM service and request that it send subsequent job state callbacks to the client listening for callbacks at the contact url named by the \fIcallback_contact\fP parameter\&. This function returns as soon as it has validated its parameters and begun sending the GRAM message\&. When the registration is complete, the function pointed to by \fIregister_callback\fP is called\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP The job contact string of the job to contact\&. This is the same value returned from \fBglobus_gram_client_job_request()\fP\&. .br \fIjob_state_mask\fP A bitwise-or of the GLOBUS_GRAM_PROTOCOL_JOB_STATE_* states that the job manager will send job state notification messages for to the contact named by \fIcallback_contact\fP\&. .br \fIcallback_contact\fP A URL string containing a GRAM client callback\&. This string is normally be generated by a process calling \fBglobus_gram_client_callback_allow()\fP\&. .br \fIattr\fP A set of client attributes to use to contact the job\&. If no custom attributes are needed, the caller should pass the value \fIGLOBUS_GRAM_CLIENT_NO_ATTR\fP\&. .br \fIregister_callback\fP A pointer to a function to call when the registration request has completed or failed\&. .br \fIregister_callback_arg\fP A pointer to application-specific data which will be passed to the function pointed to by \fIregister_callback\fP as its \fIuser_callback_arg\fP parameter\&. .RE .PP \fBReturns\fP .RS 4 Upon success, the \fBglobus_gram_client_register_job_callback_registration()\fP function returns \fIGLOBUS_SUCCESS\fP, begins to send a registration request to the job named by \fIjob_contact\fP, and schedules the \fIregister_callback\fP to be called once the registration completes or fails\&. If an error occurs, this function returns an integer error code indicating why it can't process the request\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_GRAM_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP \fBSee also\fP .RS 4 \fBglobus_gram_client_job_callback_register()\fP .RE .PP .SS "int globus_gram_client_register_job_callback_unregistration (const char * job_contact, const char * callback_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void * register_callback_arg)" .PP Unregister a callback contact to stop job state change notifications\&. The \fBglobus_gram_client_register_job_callback_unregistration()\fP function initiates the protocol to contact a GRAM service and request that it stop sending job state callbacks to the client listening at the contact url named by the \fIcallback_contact\fP parameter\&. This function returns as soon as it has validated its parameters and begun sending the GRAM message\&. When the unregistration is complete, the function pointed to by \fIregister_callback\fP is called\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP The job contact string of the job to contact\&. This is the same value returned from \fBglobus_gram_client_job_request()\fP\&. .br \fIcallback_contact\fP A URL string containing a GRAM client callback\&. This string is normally be generated by a process calling \fBglobus_gram_client_callback_allow()\fP\&. .br \fIattr\fP A set of client attributes to use to contact the job\&. If no custom attributes are needed, the caller should pass the value \fIGLOBUS_GRAM_CLIENT_NO_ATTR\fP\&. .br \fIregister_callback\fP A pointer to a function to call when the registration request has completed or failed\&. .br \fIregister_callback_arg\fP A pointer to application-specific data which will be passed to the function pointed to by \fIregister_callback\fP as its \fIuser_callback_arg\fP parameter\&. .RE .PP \fBReturns\fP .RS 4 Upon success, the \fBglobus_gram_client_register_job_callback_unregistration()\fP function returns \fIGLOBUS_SUCCESS\fP, begins sending an unregister request to the job named by \fIjob_contact\fP and schedules the function pointed to by the \fIregister_callback\fP parameter to be called\&. If an error occurs, \fBglobus_gram_client_register_job_callback_unregistration()\fP returns an integer error code indicating why it can't process the unregister request\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_GRAM_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP \fBSee also\fP .RS 4 \fBglobus_gram_client_job_callback_unregister()\fP .RE .PP .SS "int globus_gram_client_register_job_cancel (const char * job_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void * register_callback_arg)" .PP Cancel a GRAM job\&. The \fBglobus_gram_client_register_job_cancel()\fP function sends a message to a GRAM service to cancel a GRAM job\&. Depending on the job's current state, this cancellation may be immediate or require a delay for interacting with the LRM servicing the job\&. In either case, this function returns as soon as it is able to start sending the message\&. Notification when the job has been successfully canceled will be sent to all client contacts registered for notifications after the cancellation has been completely processed\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP A NULL-terminated character string containing a GRAM job contact that this function will contact to cancel the job\&. .br \fIattr\fP A set of client attributes to use to contact the job\&. If no custom attributes are needed, the caller should pass the value \fIGLOBUS_GRAM_CLIENT_NO_ATTR\fP\&. .br \fIregister_callback\fP A pointer to a function to call when the job_request request has completed or failed\&. .br \fIregister_callback_arg\fP A pointer to application-specific data which will be passed to the function pointed to by \fIregister_callback\fP as its \fIuser_callback_arg\fP parameter\&. .RE .PP \fBReturns\fP .RS 4 Upon succes, \fBglobus_gram_client_register_job_cancel()\fP returns \fIGLOBUS_SUCCESS\fP if the cancellation was successful posted to the service\&. If an error occurs, \fBglobus_gram_client_register_job_cancel()\fP returns one an integer error code indicating why it could not cancel the job\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_GRAM_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP \fBSee also\fP .RS 4 \fBglobus_gram_client_job_cancel()\fP .RE .PP .SS "int globus_gram_client_register_job_refresh_credentials (char * job_contact, gss_cred_id_t creds, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void * register_callback_arg)" .PP Delegate a new credential to a job\&. The \fBglobus_gram_client_register_job_refresh_credentials()\fP function sends a 'renew' signal to a GRAM service and then initiates the delegation of a new credential to the job manager and job\&. This prevents errors that can occur when a credential expires\&. This function returns as soon as it has determined that its parameters are valid and it has begun to send the message to the GRAM service\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP The job contact string of the job to contact\&. This is the same value returned from \fBglobus_gram_client_job_request()\fP\&. .br \fIcreds\fP A GSSAPI credential handle which will be used to authenticate with the job manager and sign the delegated credential\&. This parameter's value may be set to \fIGSS_C_NO_CREDENTIAL\fP to indicate the desire to use this process's default credential\&. .br \fIattr\fP A set of client attributes to use to contact the job\&. If no custom attributes are needed, the caller should pass the value \fIGLOBUS_GRAM_CLIENT_NO_ATTR\fP\&. .br \fIregister_callback\fP A pointer to a function to call when the status request has completed or failed\&. .br \fIregister_callback_arg\fP A pointer to application-specific data which will be passed to the function pointed to by \fIregister_callback\fP as its \fIuser_callback_arg\fP parameter\&. .RE .PP \fBReturns\fP .RS 4 Upon success, the \fBglobus_gram_client_job_refresh_credentials()\fP function returns \fIGLOBUS_SUCCESS\fP and begins sending the 'renew' request to the GRAM service\&. If an error occurs, \fBglobus_gram_client_job_refresh_credentials()\fP returns an integer error code indicating why it can't refresh the job service's credential\&. The return code may be any value defined by the \fIglobus_gram_protocol_error_t\fP enumeration in addition to those listed below\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_GRAM_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP .SS "int globus_gram_client_register_job_request (const char * resource_manager_contact, const char * description, int job_state_mask, const char * callback_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void * register_callback_arg)" .PP Send a job request to a GRAM service\&. The \fBglobus_gram_client_register_job_request()\fP function sends a GRAM protocol message to a service to request that it start a job on behalf of the client\&. .PP If \fBglobus_gram_client_register_job_request()\fP determines that this request could not be processed before contacting the gatekeeper (for example, a malformed \fIresource_manager_contact\fP), it will return an error, and the \fIregiser_callback\fP function will not be called\&. Otherwise, the success or failure an be determined by the \fIoperation_failure_code\fP parameter to the function pointed to by the \fIregister_callback\fP parameter\&. .PP \fBParameters\fP .RS 4 \fIresource_manager_contact\fP A NULL-terminated character string containing a \fBGRAM contact\fP that this function will contact\&. .br \fIdescription\fP A pointer to a string containing the job request information formatted in RSL syntax\&. .br \fIjob_state_mask\fP A bitwise-or of the GLOBUS_GRAM_PROTOCOL_JOB_STATE_* states that the job manager will send job state notification messages for to the contact named by \fIcallback_contact\fP\&. .br \fIcallback_contact\fP A GRAM listener contact that the job manager will send job state notification messages to\&. .br \fIattr\fP A set of client attributes to use to contact the gatekeeper\&. If no custom attributes are needed, the caller should pass the value \fIGLOBUS_GRAM_CLIENT_NO_ATTR\fP\&. .br \fIregister_callback\fP A pointer to a function to call when the job_request request has completed or failed\&. .br \fIregister_callback_arg\fP A pointer to application-specific data which will be passed to the function pointed to by \fIregister_callback\fP as its \fIuser_callback_arg\fP parameter\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_client_register_job_request()\fP returns GLOBUS_SUCCESS and the \fIregister_callback\fP function will be called once the job request operation completes\&. If an error occurs, this function returns an integer error code and the function pointed to by the \fIregister_callback\fP parameter will not be called\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP .SS "int globus_gram_client_register_job_request_with_info (const char * resource_manager_contact, const char * description, int job_state_mask, const char * callback_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_info_callback_func_t\fP callback, void * callback_arg)" .PP Send a job request to a GRAM service with extensions-aware callback\&. The \fBglobus_gram_client_register_job_request_with_info()\fP function sends a GRAM protocol message to a service to request that it start a job on behalf of the client\&. .PP If \fBglobus_gram_client_register_job_request_with_info()\fP determines that this request could not be processed before contacting the gatekeeper (for example, a malformed \fIresource_manager_contact\fP), it will return an error, and the \fIcallback\fP function will not be called\&. Otherwise, the success or failure an be determined by the \fIoperation_failure_code\fP parameter to the function pointed to by the \fIcallback\fP parameter\&. The difference between this function and \fI\fBglobus_gram_client_register_job_request()\fP\fP is the function signature of the callback function\&. .PP \fBParameters\fP .RS 4 \fIresource_manager_contact\fP A NULL-terminated character string containing a \fBGRAM contact\fP that this function will contact\&. .br \fIdescription\fP A pointer to a string containing the job request information formatted in RSL syntax\&. .br \fIjob_state_mask\fP A bitwise-or of the GLOBUS_GRAM_PROTOCOL_JOB_STATE_* states that the job manager will send job state notification messages for to the contact named by \fIcallback_contact\fP\&. .br \fIcallback_contact\fP A GRAM listener contact that the job manager will send job state notification messages to\&. .br \fIattr\fP A set of client attributes to use to contact the gatekeeper\&. If no custom attributes are needed, the caller should pass the value \fIGLOBUS_GRAM_CLIENT_NO_ATTR\fP\&. .br \fIcallback\fP A pointer to a function to call when the job_request request has completed or failed\&. .br \fIcallback_arg\fP A pointer to application-specific data which will be passed to the function pointed to by \fIcallback\fP as its \fIuser_callback_arg\fP parameter\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_client_register_job_request_with_info()\fP returns GLOBUS_SUCCESS and the \fIcallback\fP function will be called once the job request operation completes\&. If an error occurs, this function returns an integer error code and the function pointed to by the \fIcallback\fP parameter will not be called\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP .SS "int globus_gram_client_register_job_signal (const char * job_contact, globus_gram_protocol_job_signal_t signal, const char * signal_arg, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void * register_callback_arg)" .PP Send a signal a GRAM job\&. The \fBglobus_gram_client_register_job_signal()\fP function sends a signal message to a job managed by the GRAM service\&. Signals consist of a signal number and an optional string argument\&. The meanings of the signals supported by the GRAM job manager are defined in the GRAM Protocol documentation\&. This function returns as soon as it has determined that its parameters are valid and it has begun to send the message to the GRAM service\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP The job contact string of the job manager to contact\&. This is the same value returned from \fBglobus_gram_client_job_request()\fP\&. .br \fIsignal\fP The signal code to send to the job manager\&. .br \fIsignal_arg\fP Parameters for the signal, as described in the documentation for the #globus_gram_protocol_job_signal_t enumeration\&. .br \fIattr\fP A set of client attributes to use to contact the job\&. If no custom attributes are needed, the caller should pass the value \fIGLOBUS_GRAM_CLIENT_NO_ATTR\fP\&. .br \fIregister_callback\fP A pointer to a function to call when the signal request has completed or failed\&. .br \fIregister_callback_arg\fP A pointer to application-specific data which will be passed to the function pointed to by \fIregister_callback\fP as its \fIuser_callback_arg\fP parameter\&. .RE .PP \fBReturns\fP .RS 4 Upon success, globus_gram_client_job_register_signal() returns GLOBUS_SUCCESS after beginning to send the signal to the GRAM job and registers the \fIregister_callback\fP function to be called once that has completed\&. If an error occurs, this function returns an integer error code indicating why the client could not signal the job\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_GRAM_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP \fBSee also\fP .RS 4 \fBglobus_gram_client_register_job_signal()\fP .RE .PP .SS "int globus_gram_client_register_job_status (const char * job_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void * register_callback_arg)" .PP Send a status query to a GRAM job\&. The \fBglobus_gram_client_register_job_status()\fP function initiates a query of the current status of the job associated with the \fIjob\fP contact parameter\&. The job's status and failure code are passed to the function pointed to by the \fIregister_callback\fP parameter\&. This function returns as soon as it has begun requesting the job status\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP The job contact string of the job to query\&. This is the same value returned from \fBglobus_gram_client_job_request()\fP\&. .br \fIattr\fP A set of client attributes to use to contact the job\&. If no custom attributes are needed, the caller should pass the value \fIGLOBUS_GRAM_CLIENT_NO_ATTR\fP\&. .br \fIregister_callback\fP A pointer to a function to call when the status request has completed or failed\&. .br \fIregister_callback_arg\fP A pointer to application-specific data which will be passed to the function pointed to by \fIregister_callback\fP as its \fIuser_callback_arg\fP parameter\&. .RE .PP \fBReturns\fP .RS 4 Upon success, the \fBglobus_gram_client_register_job_status()\fP function returns \fIGLOBUS_SUCCESS\fP and begins to send a job state query to the job named by \fIjob_contact\fP and registers the function pointed to by the \fIregister_callback\fP parameter to be called once the status query terminates or fails\&. If an error occurs, \fBglobus_gram_client_register_job_status()\fP returns an integer error code\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_GRAM_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER\fP Null parameter .RE .PP .SS "int globus_gram_client_register_job_status_with_info (const char * job_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_info_callback_func_t\fP info_callback, void * callback_arg)" .PP Send a status query to a GRAM job\&. The \fBglobus_gram_client_register_job_status_with_info()\fP function initiates a query of the current status of the job associated with the \fIjob\fP contact parameter\&. Job information is returned via the \fIjob_info\fP parameter passed to the function pointed to by the \fIinfo_callback\fP parameter\&. This function returns as soon as it has begun requesting the job status\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP The job contact string of the job to query\&. This is the same value returned from \fBglobus_gram_client_job_request()\fP\&. .br \fIattr\fP A set of client attributes to use to contact the job\&. If no custom attributes are needed, the caller should pass the value \fIGLOBUS_GRAM_CLIENT_NO_ATTR\fP\&. .br \fIinfo_callback\fP A pointer to a function to call when the status request has completed or failed\&. .br \fIcallback_arg\fP A pointer to application-specific data which will be passed to the function pointed to by \fIinfo_callback\fP as its \fIuser_callback_arg\fP parameter\&. .RE .PP \fBReturns\fP .RS 4 Upon success, the \fBglobus_gram_client_register_job_status_with_info()\fP function returns \fIGLOBUS_SUCCESS\fP and begins to send a job state query to the job named by \fIjob_contact\fP and registers the function pointed to by the \fIinfo_callback\fP parameter to be called once the status query terminates or fails\&. If an error occurs, \fBglobus_gram_client_register_job_status_with_info()\fP returns an integer error code\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_GRAM_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER\fP Null parameter .RE .PP .SS "int globus_gram_client_register_ping (const char * resource_manager_contact, \fBglobus_gram_client_attr_t\fP attr, \fBglobus_gram_client_nonblocking_func_t\fP register_callback, void * register_callback_arg)" .PP Send a ping request to a GRAM service\&. The \fBglobus_gram_client_register_ping()\fP function sends a specially-formatted GRAM protocol message which checks to see if a Gatekeeper is running on a given PORT, and whether that Gatekeeper is configured to support the desired job manager service\&. This is used for diagnostic purposes\&. .PP If \fBglobus_gram_client_register_ping()\fP determines that this request could not be processed before contacting the gatekeeper (for example, a malformed \fIresource_manager_contact\fP), it will return an error, and the \fIregiser_callback\fP function will not be called\&. Otherwise, the success or failure an be determined by the \fIoperation_failure_code\fP parameter to the function pointed to by the \fIregister_callback\fP parameter\&. .PP \fBParameters\fP .RS 4 \fIresource_manager_contact\fP A NULL-terminated character string containing a \fBGRAM contact\fP that this function will contact\&. .br \fIattr\fP A set of client attributes to use to contact the gatekeeper\&. If no custom attributes are needed, the caller should pass the value \fIGLOBUS_GRAM_CLIENT_NO_ATTR\fP\&. .br \fIregister_callback\fP A pointer to a function to call when the ping request has completed or failed\&. .br \fIregister_callback_arg\fP A pointer to application-specific data which will be passed to the function pointed to by \fIregister_callback\fP as its \fIuser_callback_arg\fP parameter\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_client_register_ping()\fP returns GLOBUS_SUCCESS and the \fIregister_callback\fP function will be called once the ping operation completes\&. If an error occurs, this function returns an integer error code and the function pointed to by the \fIregister_callback\fP parameter will not be called\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_PROTOCOL_FAILED\fP Protocol error .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_JOB_CONTACT\fP Invalid job contact .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST\fP Invalid request .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES\fP No resources .RE .PP .SH "Author" .PP Generated automatically by Doxygen for globus_gram_client from the source code\&.