com.mobileapps.pcre
Class PCREApplicationClient

java.lang.Object
  |
  +--com.mobileapps.pcre.PCREClient
        |
        +--com.mobileapps.pcre.PCREApplicationClient

public class PCREApplicationClient
extends PCREClient


Fields inherited from class com.mobileapps.pcre.PCREClient
PCRE_FAIL, PCRE_NAME, PCRE_OK
 
Constructor Summary
PCREApplicationClient()
          Construct a PCREApplicationClient.
PCREApplicationClient(PCREConsole console)
          Construct a PCREApplicationClient.
PCREApplicationClient(PCREConsole console, java.lang.String host)
          Construct a PCREApplicationClient.
PCREApplicationClient(PCREConsole console, java.lang.String host, int port, java.lang.String[] args, java.util.Properties props, org.omg.CORBA.ORB orb)
          Construct a PCREApplicationClient.
PCREApplicationClient(PCREConsole console, java.lang.String host, java.lang.String[] args, java.util.Properties props)
          Construct a PCREApplicationClient.
PCREApplicationClient(PCREConsole console, java.lang.String host, java.lang.String[] args, java.util.Properties props, org.omg.CORBA.ORB orb)
          Construct a PCREApplicationClient.
PCREApplicationClient(java.lang.String host)
          Construct a PCREApplicationClient.
PCREApplicationClient(java.lang.String host, int port)
          Construct a PCREApplicationClient.
 
Method Summary
 void Connect()
          Connect the client to the Report Server.
 void Connect(boolean useLoadBalancer)
          Connect the client to the Report Server.
 void Disconnect()
          Disconnect client from all Report Server services.
 PCRELoadBalancerServer getLoadBalancerServer()
          Return the Load Balancer associated with the client.
 boolean isRetrieveMode()
          Getter method for retrieveMode member.
 void Quit()
          Short-hand for Quit(PCREClient.PCRE_OK).
 void Quit(int code)
          Disconnect client and release server resources.
 PCREReportServerInfo[] RequestReportServerList()
           
 void ResetReportServer(PCREReportServerInfo rsinfo)
          Reset the PCREGateway, PCREServer and PCREConfigServer host name as well as the PCREGateway name with the help of PCREReportServerInfo data.
 void SelectReportServer(java.lang.String method)
          Use the Load balancer to select a Gateway by the given method.
 void setRetrieveMode(boolean newRetrieveMode)
          Setter method for retrieveMode member.
 
Methods inherited from class com.mobileapps.pcre.PCREClient
Connected, DisableScripting, EnableScripting, GetAPI, getApplet, getAppletHost, getConfigServer, getConsole, getCustomServer, getDefaultConsole, getGateway, getHost, getName, getORB, GetPrinterInfo, GetPrinterNames, getServer, GetService, getThreadConsole, InvokeScript, isAppletClient, OpenEngine, OpenEngine, PutAPI, PutService, RemoveAPI, RemoveService, setConfigServer, setCustomServer, setDefaultConsole, setGatewayServer, setName, setReportEngineServer, setThreadConsole, Terminate, Terminate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PCREApplicationClient

public PCREApplicationClient()
                      throws PCREClientError
Construct a PCREApplicationClient. The client will connect to a PCRE Gateway Service on an available but indeterminate host and request a server from the Gateway.

PCREApplicationClient

public PCREApplicationClient(PCREConsole console)
                      throws PCREClientError
Construct a PCREApplicationClient. The client will connect to a PCRE Gateway Service on an available but indeterminate host and request a server from the Gateway.
Parameters:
console - The application console class.

PCREApplicationClient

public PCREApplicationClient(PCREConsole console,
                             java.lang.String host)
                      throws PCREClientError
Construct a PCREApplicationClient. The client will connect to a PCRE Gateway Service on the given host, and request a PCRE server from the Gateway.
Parameters:
console - The application console class.
host - The host ip-address for the Gateway.

PCREApplicationClient

public PCREApplicationClient(PCREConsole console,
                             java.lang.String host,
                             java.lang.String[] args,
                             java.util.Properties props)
                      throws PCREClientError
Construct a PCREApplicationClient. The client will connect to a PCRE Gateway Service on the given host, and request a PCRE server from the Gateway.
Parameters:
console - The application console class.
host - The host ip-address for the Gateway.
args - The command-line arguments.
props - The ORB properties.

PCREApplicationClient

public PCREApplicationClient(PCREConsole console,
                             java.lang.String host,
                             java.lang.String[] args,
                             java.util.Properties props,
                             org.omg.CORBA.ORB orb)
                      throws PCREClientError
Construct a PCREApplicationClient. The client will connect to a PCRE Gateway Service on the given host, and request a PCRE server from the Gateway.
Parameters:
console - The application console class.
host - The host ip-address for the Gateway.
args - The command-line arguments.
props - The ORB properties.
orb - The client ORB.

PCREApplicationClient

public PCREApplicationClient(PCREConsole console,
                             java.lang.String host,
                             int port,
                             java.lang.String[] args,
                             java.util.Properties props,
                             org.omg.CORBA.ORB orb)
                      throws PCREClientError
Construct a PCREApplicationClient. The client will connect to a PCRE Gateway Service on the given host, and request a PCRE server from the Gateway.
Parameters:
console - The application console class.
host - The host ip-address for the Gateway.
port - The port for obtaining the initial reference.
args - The command-line arguments.
props - The ORB properties.
orb - The client ORB.

PCREApplicationClient

public PCREApplicationClient(java.lang.String host)
                      throws PCREClientError
Construct a PCREApplicationClient. The client will connect to a PCRE Gateway Service on the given host, and request a PCRE server from the Gateway.
Parameters:
host - The host ip-address for the Gateway.

PCREApplicationClient

public PCREApplicationClient(java.lang.String host,
                             int port)
                      throws PCREClientError
Construct a PCREApplicationClient. The client will connect to a PCRE Gateway Service on the given host, and request a PCRE server from the Gateway.
Parameters:
host - The host ip-address for the Gateway.
port - The port for obtaining the initial reference.
Method Detail

Connect

public void Connect()
             throws PCREError,
                    GatewayShuttingDown
Connect the client to the Report Server.
Throws:
PCREError - Is thrown on error.
Overrides:
Connect in class PCREClient

Connect

public void Connect(boolean useLoadBalancer)
             throws PCREError,
                    GatewayShuttingDown
Connect the client to the Report Server. If useLoadBalancer is true, the the Load Balancer will automatically select the Report Server host.
Parameters:
useLoadBalancer - Boolean value used to connect a report server via a load balancer.
Throws:
PCREError - Is thrown on error.
Overrides:
Connect in class PCREClient

Disconnect

public void Disconnect()
                throws PCREError
Disconnect client from all Report Server services.
Throws:
PCREError - is thrown on error.
Overrides:
Disconnect in class PCREClient

getLoadBalancerServer

public PCRELoadBalancerServer getLoadBalancerServer()
Return the Load Balancer associated with the client.
Returns:
The current PCRELoadBalancerServer instance.

isRetrieveMode

public boolean isRetrieveMode()
Getter method for retrieveMode member.
Returns:
boolean

Quit

public void Quit()
Short-hand for Quit(PCREClient.PCRE_OK).
Overrides:
Quit in class PCREClient

Quit

public void Quit(int code)
Disconnect client and release server resources.
Parameters:
code - The termination code.
Overrides:
Quit in class PCREClient

RequestReportServerList

public PCREReportServerInfo[] RequestReportServerList()
                                               throws PCREServerError,
                                                      PCREClientError

ResetReportServer

public void ResetReportServer(PCREReportServerInfo rsinfo)
                       throws PCREClientError
Reset the PCREGateway, PCREServer and PCREConfigServer host name as well as the PCREGateway name with the help of PCREReportServerInfo data.
Parameters:
rsinfo - A PCREReportServerInfo containing the new PCREGateway host and name.
Overrides:
ResetReportServer in class PCREClient

SelectReportServer

public void SelectReportServer(java.lang.String method)
                        throws PCREClientError,
                               PCREServerError
Use the Load balancer to select a Gateway by the given method.
Overrides:
SelectReportServer in class PCREClient

setRetrieveMode

public void setRetrieveMode(boolean newRetrieveMode)
Setter method for retrieveMode member.
Parameters:
newRetrieveMode - boolean