[ROOT] --> C++Client
The PCREAppClient class provides a framework for C++ client connections.
PCREAppClient
PCREAppClient
Connect
Disconnect
getConfigServer
getFileServer
getGateway
getLoadBalancer
getServer
RequestReportServerList
ResetReportServer
PCREAppClient ( PCREConsole * console ,
const char * host = NULL ,
int argc = 0 ,
char * const * argv = NULL ) ;
Construct a client with given console and install PCRE Gateway and Server services. A subsequent call to Connect() will connect the client to corresponding servers on the specified host.
| Console | The console to use when communicating with this client |
| host | The host to connect to. |
| argv | Reserved; must be NULL. |
| argc | Reserved; must be 0. |
PCREAppClient ( const char * host = NULL ,
int argc = 0 ,
char * const * argv = NULL ) ;
Construct a client with a default command-line console and install PCRE Gateway and Server services. A subsequent call to Connect() will connect the client to corresponding servers on the specified host.
| host | The host to connect to. |
| argv | Reserved; must be NULL. |
| argc | Reserved; must be 0. |
void Connect ( BOOL useLoadBalancer = FALSE ) ;
Establish connections to services registered with the client.
| useLoadBalancer | Indicates whether the Load Balancer Service should be used to select the host machine for the services. If useLoadBalancer is set to TRUE, then the Load Balancer will be used in automatic mode. |
void Disconnect ( ) ;
Disconnect the client from its services.
PCREConfigServer * getConfigServer ( ) const ;
Return a reference to the Configuration Server registered with the client.
PCREFileServer * getFileServer ( ) const ;
Return a reference to the File Return service registered with the client.
PCREGateway * getGateway ( ) const ;
Return a reference to the PCRE Gateway registered with the client.
PCRELoadBalancerServer * getLoadBalancer ( ) const ;
Return a reference to the PCRE Load Balancer Service registered with the client.
PCREServer * getServer ( ) const ;
Return a reference to the PCRE Report Server registered with the client.
int RequestReportServerList ( PCREReportServerInfo * buffer ,
UINT elements ) ;
Retrieve a list of available report servers from the Load Balancer Service. Information will be supplied for each server that can be used to implement a user-defined load balancing algorithm. This is refered to as "manual" operation of the Load Balancer. To complete "manual" operation of the Load Balancer, pass the PCREReportServerInfo structure describing the selected server to the ResetReportServer method.
| buffer | Must point to a buffer which will receive information about the available report servers. The buffer must be large enough to hold elements PCREReportServerInfo structures. |
| elements | The number of report servers for which information can be stored in buffer. |
| The number of report servers for which information was placed in buffer. |
void ResetReportServer ( PCREReportServerInfo info ) ;
Reset the PCREGateway, PCREServer, and PCREConfigServer registered with the client to use services on the specified report server.
| info | Contains information describing the report server to use. |