GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

request.c File Reference

Source file for the GATRequestCPI provider class for the request adaptor. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "GATCPI.h"
#include "GATRequestNotifier.h"
#include "GATRequestCPIInstanceData.h"
#include "request.h"

Include dependency graph for request.c:

Include dependency graph

Go to the source code of this file.

Defines

#define PATH_MAX   4096

Functions

void resourcebroker_adaptor_GATRequestCPI_Destroy (void *data)
GATResult resourcebroker_adaptor_GATRequestCPI_ServiceActions (void *data, GATRequestCPI_Instance *instance_data, GATTimePeriod_const timeout)
 logicalfile_adaptor_LogicalFileCPI_ServiceActions

GATResult resourcebroker_adaptor_GATRequestCPI_CreateInstance (void *adaptor_data, GATRequestCPI_Instance *instance_data, void *initialisation_data)
 resourcebroker_adaptor_GATRequestCPI_CreateInstance Create a new CPI object instance.

void resourcebroker_adaptor_GATRequestCPI_DestroyInstance (void *data, GATRequestCPI_Instance *instance_data)
 resourcebroker_adaptor_GATRequestCPI_DestroyInstance Destroy a CPI object instance.

GATResult resourcebroker_adaptor_GATRequestCPI_CloneInstance (void *data, GATRequestCPI_Instance const *instance_data, GATRequestCPI_Instance *new_instance_data)
 resourcebroker_adaptor_GATRequestCPI_CloneInstance Clone a CPI object instance.

GATResult resourcebroker_adaptor_GATRequestCPI_EqualsInstance (void *data, GATRequestCPI_Instance const *lhs, GATRequestCPI_Instance const *rhs, GATBool *isequal)
 resourcebroker_adaptor_GATRequestCPI_EqualsInstance Clone a CPI object instance.

GATResult resourcebroker_adaptor_GATRequestCPI_InitRequestNotifier (void *data, GATRequestCPI_Instance const *instance_data, GATRequestNotifier_const *notifier)
 resourcebroker_adaptor_GATRequestCPI_InitRequestNotifier

GATResult resourcebroker_adaptor_GATRequestCPI_request_notifier_listener (void *data, GATRequestCPI_Instance const *instance_data, GATTable_const notifier_data, void *context_data)
 resourcebroker_adaptor_GATRequestCPI_request_notifier_listener

GATResult resourcebroker_adaptor_Register_GATRequestCPI (GATContext error_context, GATRegistry registry, GATTable_const system_config, GATTable_const instance_config, void *token)

Variables

const char * rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/request.c,v 1.4 2004/04/26 15:45:00 hartmutkaiser Exp $"


Detailed Description

Source file for the GATRequestCPI provider class for the request adaptor.

Date:
Mon Feb 02 2004
Version:
Header:
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/request.c,v 1.4 2004/04/26 15:45:00 hartmutkaiser Exp

Copyright (C) Hartmut Kaiser This file is part of the GAT Engine. Contributed by Hartmut Kaiser <hartmutkaiser [at] t-online [dot] de>.

Use, modification and distribution is subject to the Gridlab Software License. (See accompanying file GLlicense.txt or copy at http://www.gridlab.org/GLlicense.txt)

Definition in file request.c.


Define Documentation

#define PATH_MAX   4096
 

Definition at line 35 of file request.c.

Referenced by resourcebroker_adaptor_GATRequestCPI_request_notifier_listener().


Function Documentation

void resourcebroker_adaptor_GATRequestCPI_Destroy void *    data [static]
 

Definition at line 155 of file request.c.

References assert, and data.

Referenced by resourcebroker_adaptor_Register_GATRequestCPI().

GATResult resourcebroker_adaptor_GATRequestCPI_ServiceActions void *    data,
GATRequestCPI_Instance   instance_data,
GATTimePeriod_const    timeout
[static]
 

logicalfile_adaptor_LogicalFileCPI_ServiceActions

The function logicalfile_adaptor_LogicalFileCPI_ServiceActions is called, whenever the client calls GATContext_ServiceActions. This function is called for every created object. This function should be used to update all instance specific data, which may have been changed asynchronously or to fire pending events.

Parameters:
data  Adaptor-provided data object.
instance_data  The instance data of this CPI object
timeout  This may be a 0 timeout to indicate no timeout at all, or a specific time length.
Returns:
An error code.

Definition at line 180 of file request.c.

References data, GAT_INVALID_HANDLE, GAT_SUCCESS, GATRequest_IssueCommand(), GATResult, GATTimePeriod_const, GATRequestCPI_Instance_S::instance_data, GATRequestCPI_Instance_S::source, and GATRequestCPIInstance_Data::start_time.

Referenced by resourcebroker_adaptor_Register_GATRequestCPI().

GATResult resourcebroker_adaptor_GATRequestCPI_CreateInstance void *    data,
GATRequestCPI_Instance   new_instance_data,
void *    initialisation_data
[static]
 

resourcebroker_adaptor_GATRequestCPI_CreateInstance Create a new CPI object instance.

Adaptor implementation of create instance capability.

Parameters:
data  Adaptor-provided data object.
context  The GATContext for this CPI instance
target  The location of the file in question.
new_instance_data  The pointer to the variable, where the instance data of this CPI object is to be returned to.
Returns:
An error code.

Definition at line 212 of file request.c.

References GATRequestCPI_Instance_S::context, data, GAT_CREATE_STATUS, GAT_INVALID_HANDLE, GAT_RETURN_STATUS, GAT_USES_STATUS, GATRequestCPIInstance_Data_Clone(), and GATRequestCPI_Instance_S::instance_data.

Referenced by resourcebroker_adaptor_Register_GATRequestCPI().

void resourcebroker_adaptor_GATRequestCPI_DestroyInstance void *    data,
GATRequestCPI_Instance   instance_data
[static]
 

resourcebroker_adaptor_GATRequestCPI_DestroyInstance Destroy a CPI object instance.

Adaptor implementation of destroy instance capability.

Parameters:
data  Adaptor-provided data object.
instance_data  The instance data of the CPI object to destroy.

Definition at line 236 of file request.c.

References data, GATRequestCPIInstance_Data_Destroy(), and GATRequestCPI_Instance_S::instance_data.

Referenced by resourcebroker_adaptor_Register_GATRequestCPI().

GATResult resourcebroker_adaptor_GATRequestCPI_CloneInstance void *    data,
GATRequestCPI_Instance const *    instance_data,
GATRequestCPI_Instance   new_instance_data
[static]
 

resourcebroker_adaptor_GATRequestCPI_CloneInstance Clone a CPI object instance.

Adaptor implementation of the clone instance capability.

Parameters:
data  Adaptor-provided data object.
instance_data  The instance data of this CPI object
new_instance_data  The pointer to the variable, where the instance data of the cloned CPI object is to be returned to.
Returns:
An error code.

Definition at line 255 of file request.c.

References GATRequestCPI_Instance_S::context, data, GAT_CREATE_STATUS, GAT_INVALID_HANDLE, GAT_INVALID_PARAMETER, GAT_RETURN_STATUS, GAT_USES_STATUS, GATRequestCPIInstance_Data_Clone(), and GATRequestCPI_Instance_S::instance_data.

Referenced by resourcebroker_adaptor_Register_GATRequestCPI().

GATResult resourcebroker_adaptor_GATRequestCPI_EqualsInstance void *    data,
GATRequestCPI_Instance const *    lhs,
GATRequestCPI_Instance const *    rhs,
GATBool   isequal
[static]
 

resourcebroker_adaptor_GATRequestCPI_EqualsInstance Clone a CPI object instance.

Adaptor implementation of the clone instance capability.

Parameters:
data  Adaptor-provided data object.
lhs  The instance data of the left CPI object.
lhs  The instance data of the right CPI object.
isequal  The pointer to the variable, where the result is to be returned to.
Returns:
An error code.

Definition at line 292 of file request.c.

References GATRequestCPI_Instance_S::context, data, GAT_CREATE_STATUS, GAT_INVALID_HANDLE, GAT_RETURN_STATUS, GAT_USES_STATUS, GATBool, GATRequestCPIInstance_Data_Equals(), and GATRequestCPI_Instance_S::instance_data.

Referenced by resourcebroker_adaptor_Register_GATRequestCPI().

GATResult resourcebroker_adaptor_GATRequestCPI_InitRequestNotifier void *    data,
GATRequestCPI_Instance const *    instance_data,
GATRequestNotifier_const   notifier
[static]
 

resourcebroker_adaptor_GATRequestCPI_InitRequestNotifier

Calls the adaptor to return the associated request notifier.

Parameters:
data  Adaptor-provided data object.
instance_data  The instance data of the CPI object to ask for the request notifier.
notifier  The pointer to a variable, which should receive the returned request notifier.
Returns:
An error code.

Definition at line 326 of file request.c.

References data, GAT_INVALID_PARAMETER, GAT_MEMORYFAILURE, GAT_SUCCESS, GATRequestNotifier, GATRequestNotifier_const, GATRequestNotifier_Create(), GATRequestNotifier_Destroy(), GATResult, and resourcebroker_adaptor_GATRequestCPI_request_notifier_listener().

Referenced by resourcebroker_adaptor_Register_GATRequestCPI().

GATResult resourcebroker_adaptor_GATRequestCPI_request_notifier_listener void *    data,
GATRequestCPI_Instance const *    instance_data,
GATTable_const    notifier_data,
void *    context_data
[static]
 

resourcebroker_adaptor_GATRequestCPI_request_notifier_listener

Definition at line 354 of file request.c.

References data, GAT_FAIL, GAT_INVALID_HANDLE, GAT_SUCCEEDED, GAT_SUCCESS, GATResult, GATTable_const, GATTable_Get_String(), and PATH_MAX.

Referenced by resourcebroker_adaptor_GATRequestCPI_InitRequestNotifier().

GATResult resourcebroker_adaptor_Register_GATRequestCPI GATContext    error_context,
GATRegistry    registry,
GATTable_const    system_config,
GATTable_const    instance_config,
void *    token
 

Definition at line 85 of file request.c.

References GATRequestCPI_Data::clone_instance, cpi, GATRequestCPI_Data::create_instance, GATRequestCPI_Data::data, GATRequestCPI_Data::destroy, GATRequestCPI_Data::destroy_instance, GATRequestCPI_Data::equals_instance, GAT_CREATE_STATUS, GAT_CURRENT_STATUS, GAT_FAILED, GAT_MEMORYFAILURE, GAT_RETURN_STATUS, GAT_USES_STATUS, GATPreferences_Add(), GATPreferences_Create(), GATPreferences_Destroy(), GATRequestCPI_Create(), GATRequestCPI_Destroy(), GATREQUESTCPI_VERSION, GATResult, GATTable_const, GATRequestCPI_Data::init_notifier, resourcebroker_adaptor_GATRequestCPI_CloneInstance(), resourcebroker_adaptor_GATRequestCPI_CreateInstance(), resourcebroker_adaptor_GATRequestCPI_Destroy(), resourcebroker_adaptor_GATRequestCPI_DestroyInstance(), resourcebroker_adaptor_GATRequestCPI_EqualsInstance(), resourcebroker_adaptor_GATRequestCPI_InitRequestNotifier(), resourcebroker_adaptor_GATRequestCPI_ServiceActions(), GATRequestCPI_Data::service_actions, and token.

Referenced by resourcebroker_adaptor_register().


Variable Documentation

const char* rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/request.c,v 1.4 2004/04/26 15:45:00 hartmutkaiser Exp $" [static]
 

Definition at line 18 of file request.c.