TSP: The Transport Sample Protocol



Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

Request
[Provider]


Data Structures

struct  rqh_manager_data_t
 The TSP rqh manager data structure. More...

struct  TSP_provider_request_handler_t
 The structure TSP_provider_request_handler_t define object-oriented interface to a TSP request handler. More...


Enumerations

enum  TSP_request_handler_status_t {
  TSP_RQH_STATUS_NOTINSTALLED = 0, TSP_RQH_STATUS_IDLE, TSP_RQH_STATUS_CONFIGURED, TSP_RQH_STATUS_RUNNING,
  TSP_RQH_STATUS_STOPPED
}
 Request handler status. More...


Functions

int TSP_provider_rqh_manager_get_max_nb (void)
 Get the maximum number of TSP_provider_request_handler.

int TSP_provider_rqh_manager_get_nb (void)
 Get the current number of TSP_provider_request_handler installed.

int TSP_provider_rqh_manager_get_nb_running (void)
 Get the current number of TSP_provider_request_handler running.

TSP_provider_request_handler_tTSP_provider_rqh_manager_get (int rank)
 Get a request_handler.

char * TSP_provider_rqh_manager_get_url (int rank)
 Get the URL for this request handler.

int TSP_provider_rqh_manager_install (int rank, tsp_request_handler_ft rqh_constructor)
 Install a TSP request handler.

int TSP_provider_rqh_manager_init (void)
 Set-up TSP initial request handlers.

int TSP_provider_rqh_manager_refresh (void)
 Refresh TSP request handlers activities this may start new request handler and/or stop running ones.

void TSP_provider_rqh_manager_waitend (void)
 This is a blocking function calls which triggers a wait on a condition variable which is signalled iff no more request handlers thread are running.


Detailed Description

The Request module is the set of all request handling API for TSP. We define here the TSP request handler object and how to install and use it.

Enumeration Type Documentation

enum TSP_request_handler_status_t
 

Request handler status.

Enumeration values:
TSP_RQH_STATUS_NOTINSTALLED  The request handler is not installed other field of the TSP_provider_request_handler_t are not significant.
TSP_RQH_STATUS_IDLE  The request handler is IDLE.
TSP_RQH_STATUS_CONFIGURED  The request handler is CONFIGURED.
TSP_RQH_STATUS_RUNNING  The request handler is RUNNING.
TSP_RQH_STATUS_STOPPED  The request handler is STOPPED.

Definition at line 76 of file tsp_request.h.


Function Documentation

TSP_provider_request_handler_t* TSP_provider_rqh_manager_get int  rank  ) 
 

Get a request_handler.

Returns:
the pointer to the actual request handler pointer may be NULL if rank is invalid.

Definition at line 78 of file tsp_request.c.

References TSP_provider_rqh_manager_get_max_nb().

Referenced by TSP_provider_rqh_manager_get_url(), TSP_provider_rqh_manager_install(), and TSP_provider_rqh_manager_refresh().

int TSP_provider_rqh_manager_get_max_nb void   ) 
 

Get the maximum number of TSP_provider_request_handler.

Definition at line 42 of file tsp_request.c.

Referenced by TSP_provider_rqh_manager_get(), TSP_provider_rqh_manager_get_nb(), TSP_provider_rqh_manager_init(), and TSP_provider_rqh_manager_refresh().

int TSP_provider_rqh_manager_get_nb void   ) 
 

Get the current number of TSP_provider_request_handler installed.

Definition at line 47 of file tsp_request.c.

References TSP_provider_rqh_manager_get_max_nb(), and TSP_RQH_STATUS_NOTINSTALLED.

int TSP_provider_rqh_manager_get_nb_running void   ) 
 

Get the current number of TSP_provider_request_handler running.

Definition at line 64 of file tsp_request.c.

char* TSP_provider_rqh_manager_get_url int  rank  ) 
 

Get the URL for this request handler.

Returns:
the string for the URL pointer may be NULL if rank is invalid or handler is KO.

Definition at line 93 of file tsp_request.c.

References TSP_provider_rqh_manager_get(), and TSP_provider_request_handler_t::url.

Referenced by TSP_provider_urls().

int TSP_provider_rqh_manager_init void   ) 
 

Set-up TSP initial request handlers.

Returns:
TRUE on success, FALSE on failure

Definition at line 138 of file tsp_request.c.

References TSP_provider_rqh_manager_get_max_nb(), and TSP_RQH_STATUS_NOTINSTALLED.

Referenced by TSP_provider_init().

int TSP_provider_rqh_manager_install int  rank,
tsp_request_handler_ft  rqh_constructor
 

Install a TSP request handler.

Returns:
TRUE on success FALSE on failure

Definition at line 106 of file tsp_request.c.

References TSP_provider_request_handler_t::status, TSP_provider_rqh_manager_get(), and TSP_RQH_STATUS_NOTINSTALLED.

Referenced by TSP_provider_run().

int TSP_provider_rqh_manager_refresh void   ) 
 

Refresh TSP request handlers activities this may start new request handler and/or stop running ones.

Returns:
TRUE on success, FALSE on failure

Definition at line 173 of file tsp_request.c.

References TSP_provider_request_handler_t::config, TSP_provider_request_handler_t::run, TSP_provider_request_handler_t::status, TSP_provider_request_handler_t::tid, TSP_provider_rqh_manager_get(), TSP_provider_rqh_manager_get_max_nb(), TSP_RQH_STATUS_IDLE, and TSP_RQH_STATUS_RUNNING.

Referenced by TSP_provider_run().

void TSP_provider_rqh_manager_waitend void   ) 
 

This is a blocking function calls which triggers a wait on a condition variable which is signalled iff no more request handlers thread are running.

Definition at line 276 of file tsp_request.c.

Referenced by TSP_provider_run().

Framework Home Page.


Beware !! TSP wave is coming...