- Job state callbacks
- Data Structures
- struct globus_gram_client_job_info_s
Extensible job information structure.
- Typedefs
- typedef void(* globus_gram_client_callback_func_t )(void
*user_callback_arg, char *job_contact, int state, int errorcode)
- typedef struct globus_gram_client_job_info_s
globus_gram_client_job_info_t
- typedef void(* globus_gram_client_info_callback_func_t )(void
*user_callback_arg, const char *job_contact,
globus_gram_client_job_info_t *job_info)
- typedef void(* globus_gram_client_nonblocking_func_t )(void
*user_callback_arg, globus_gram_protocol_error_t
operation_failure_code, const char *job_contact,
globus_gram_protocol_job_state_t job_state,
globus_gram_protocol_error_t job_failure_code)
- Functions
- int globus_gram_client_callback_allow
(globus_gram_client_callback_func_t callback_func, void
*user_callback_arg, char **callback_contact)
- int globus_gram_client_info_callback_allow
(globus_gram_client_info_callback_func_t callback_func, void
*user_callback_arg, char **callback_contact)
- int globus_gram_client_callback_disallow (char *callback_contact)
- int globus_gram_client_callback_allow (globus_gram_client_callback_func_t
- callback_func, void * user_callback_arg, char ** callback_contact)
Begin listening for job state change callbacks. The
globus_gram_client_callback_allow() function initializes a GRAM
protocol service in the current process which will process job state
updates from GRAM Job Managers. The URL to contact this service is
returned and may be used with the globus_gram_client_job_request() or
globus_gram_client_callback_register() family of functions.
- Parameters:
callback_func A pointer to a function to call when a new job state
update is received.
user_callback_arg A pointer to application-specific data which is
passed to the function pointed to by callback_func as its
user_callback_arg parameter.
callback_contact An output parameter that points to a string that
will be allocated and set to the URL that the GRAM callback
listener is waiting on.
- Returns:
Upon success, globus_gram_client_callback_allow() returns
GLOBUS_SUCCESS opens a TCP port to accept job state updates and
modifies the value pointed to by the callback_contact parameter as
described above. If an error occurs,
globus_gram_client_callback_allow() returns an integer error code.
- Return values:
GLOBUS_SUCCESS Success
GLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER Null parameter
GLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST Invalid request
GLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED Out of memory
GLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES No resources
- int globus_gram_client_info_callback_allow
- (globus_gram_client_info_callback_func_t callback_func, void *
user_callback_arg, char ** callback_contact)
Begin listening for job state change callbacks. The
globus_gram_client_info_callback_allow() function initializes a GRAM
protocol service in the current process which will process job state
updates from GRAM Job Managers. The URL to contact this service is
returned and may be used with the
globus_gram_client_job_request_with_info() or
globus_gram_client_register_job_status_with_info() family of functions.
- Parameters:
callback_func A pointer to a function to call when a new job state
update is received. The function signature of this parameter
supports GRAM protocol extensions.
user_callback_arg A pointer to application-specific data which is
passed to the function pointed to by callback_func as its
user_callback_arg parameter.
callback_contact An output parameter that points to a string that
will be allocated and set to the URL that the GRAM callback
listener is waiting on.
- Returns:
Upon success, globus_gram_client_callback_allow() returns
GLOBUS_SUCCESS opens a TCP port to accept job state updates and
modifies the value pointed to by the callback_contact parameter as
described above. If an error occurs,
globus_gram_client_callback_allow() returns an integer error code.
- Return values:
GLOBUS_SUCCESS Success
GLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER Null parameter
GLOBUS_GRAM_PROTOCOL_ERROR_INVALID_REQUEST Invalid request
GLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED Out of memory
GLOBUS_GRAM_PROTOCOL_ERROR_NO_RESOURCES No resources
- int globus_gram_client_callback_disallow (char * callback_contact)
- Stop listening for job state change callbacks. The
globus_gram_client_callback_disallow() function stops the GRAM protocol
handler associated with a callback contact from receiving further
messages. After this function returns, no further callbacks for this
contact will be called. Furthermore, the network port associated with
the protocol handler will be released.
- This function can only be used to disable a callback contact created in
the current process.
- Parameters:
callback_contact A callback contact string that refers to a
protocol handler in the current process.
- Returns:
Upon success, globus_gram_client_callback_disallow() returns
GLOBUS_SUCCESS, closes the network port associated with the
callback_contact parameter and stops further callbacks from
occurring. If an error occurs,
globus_gram_client_callback_disallow() returns an integer error
code.
- Return values:
GLOBUS_SUCCESS Success
GLOBUS_GRAM_PROTOCOL_ERROR_CALLBACK_NOT_FOUND Callback not found