com.dynalivery.harmoni
Class HarmoniClient

java.lang.Object
  |
  +--com.dynalivery.harmoni.HarmoniClient
Direct Known Subclasses:
HarmoniApplicationClient

public class HarmoniClient
extends java.lang.Object


Field Summary
static java.lang.String CRYSTAL7
          Crystal 7 Server Type
static java.lang.String CRYSTAL9
          Crystal 9 Server Type
 java.lang.String folder
          folder variable
static int HARMONI_FAIL
          Failure return code.
static java.lang.String HARMONI_NAME
          The default Harmoni name
static int HARMONI_OK
          Successful return code.
 int priority
          priority variable
static int PRIORITY_HIGH
          HIGH PRIORITY variable
static int PRIORITY_LOW
          LOW PRIORITY variable
static int PRIORITY_MEDIUM
          MEDIUM PRIORITY variable
 boolean verbose
          verbose variable
static java.lang.String WORD
          Word Server Type
 
Constructor Summary
HarmoniClient()
          Construct a Harmoni client context for Java applications with given console, command-line arguments and property-array.
HarmoniClient(LogService logger)
          Construct a Harmoni client context for Java applications with given console, command-line arguments and property-array.
 
Method Summary
 void Connect()
          Connect client to selected Harmoni services.
 void Connect(boolean useLoadBalancer)
          Connect client to selected Harmoni services.
 boolean Connected(java.lang.String name)
          Is the Client connected to named service.
 void Disconnect()
          Disconnect client from all Harmoni services.
 java.lang.Object GetAPI(java.lang.String name)
          Get an API object from the registry.
 boolean getArchiveFileReturnOption()
          Getter method for zipFlag member.
 java.lang.String getClientName()
          Getter method for clientName member
 HarmoniConfigServer getConfigServer()
          Returns the config server object associated with this client.
 boolean getDisableServerTimeout()
          Getter method for disableServerTimeout flag.
 java.lang.String getFolder()
          Getter method for folder member
 HarmoniGateway getGateway()
          Returns the gateway server object associated with this client.
static java.lang.String getHost()
          Return the Harmoni client's host IP-address.
static LogService getLog()
          Return the Harmoni client's log
 java.lang.String getName()
          Return the client's name.
 org.omg.CORBA.ORB getORB()
          Return the client orb.
 java.lang.String[] GetPrinterInfo(java.lang.String printerName, java.lang.StringBuffer driverName, HarmoniDEVMODE devMode)
          This method returns the printer Info given the Printer Name
 java.lang.String[] GetPrinterNames()
          This method returns the names of the printers attached to the report server
 int getPriority()
          Getter method for priority member.
 HarmoniServer getServer()
          Returns the Harmoniserver object associated with this client.
 java.lang.String getServerType()
           
 HarmoniService GetService(java.lang.String name)
          Get a service from the client's registry.
static org.omg.CORBA.ORB getSharedORB()
          Get the shared ORB instance.
 boolean getVerbose()
          Getter method for verbose member
 PCREEngine OpenCrystalEngine()
          Acquire a print-engine for this client.
 WordEngine OpenWordEngine()
          Acquire a print-engine for this client.
 void PutAPI(java.lang.String name, java.lang.Object api)
          Put an API object into the registry.
 void PutService(HarmoniService service)
          Enter a Harmoni service in the client's registry.
 void Quit()
          Short-hand for Quit(HarmoniClient.Harmoni_OK).
 void Quit(int code)
          Disconnect client from all Harmoni services.
 void RemoveAPI(java.lang.String name)
          Remove an API object from the registry.
 void RemoveService(java.lang.String name)
          Remove a service from the client's registry.
 void ResetReportServer(HarmoniReportServerInfo rsinfo)
           
 void SelectReportServer(java.lang.String method)
          Use the Load balancer to select a Gateway by the given method.
 void setArchiveFileReturnOption(boolean zipOption)
          Setter method for zipFlag member.
 void setClientName(java.lang.String value)
          Setter method for clientName member
 void setConfigServer(HarmoniConfigServer newConfigServer)
          Sets the config server object associated with this client.
 void setDisableServerTimeout(boolean timeoutFlag)
          Setter method for disableServerTimeout flag.
 void setFolder(java.lang.String value)
          Setter method for folder member
 void setGatewayServer(HarmoniGateway newGatewayServer)
          Sets the gateway server object associated with this client.
 void setLog(LogService logger)
           
 void setName(java.lang.String name)
          Set the client's name.
 void setPriority(int clientPriority)
          Setter method for priority member.
 void setReportEngineServer(HarmoniServer newReportEngineServer)
          Sets the Harmoniserver object associated with this client.
 void setServerType(java.lang.String typ)
           
static void setSharedORB(org.omg.CORBA.ORB theSharedORB)
          Set the shared ORB instance.
 void setVerbose(boolean value)
          Setter method for verbose member
static void Terminate()
          Short-hand for Terminate(Harmoni_FAIL);
static void Terminate(int code)
          Terminate the client application.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HARMONI_OK

public static final int HARMONI_OK
Successful return code.

HARMONI_FAIL

public static final int HARMONI_FAIL
Failure return code.

HARMONI_NAME

public static final java.lang.String HARMONI_NAME
The default Harmoni name

PRIORITY_HIGH

public static final int PRIORITY_HIGH
HIGH PRIORITY variable

PRIORITY_MEDIUM

public static final int PRIORITY_MEDIUM
MEDIUM PRIORITY variable

PRIORITY_LOW

public static final int PRIORITY_LOW
LOW PRIORITY variable

CRYSTAL7

public static final java.lang.String CRYSTAL7
Crystal 7 Server Type

CRYSTAL9

public static final java.lang.String CRYSTAL9
Crystal 9 Server Type

WORD

public static final java.lang.String WORD
Word Server Type

priority

public int priority
priority variable

verbose

public boolean verbose
verbose variable

folder

public java.lang.String folder
folder variable
Constructor Detail

HarmoniClient

public HarmoniClient()
Construct a Harmoni client context for Java applications with given console, command-line arguments and property-array.
Parameters:
logger - Log Service

HarmoniClient

public HarmoniClient(LogService logger)
Construct a Harmoni client context for Java applications with given console, command-line arguments and property-array.
Parameters:
logger - Log Service
Method Detail

Connect

public void Connect()
             throws HarmoniError,
                    GatewayShuttingDown
Connect client to selected Harmoni services. Clients should override.
Throws:
HarmoniError - Is thrown on error.

Connect

public void Connect(boolean useLoadBalancer)
             throws HarmoniError,
                    GatewayShuttingDown
Connect client to selected Harmoni services. Clients should override.
Parameters:
useLoadBalancer - Boolean value used to connect a report server via a load balancer.
Throws:
HarmoniError - Is thrown on error.

Connected

public boolean Connected(java.lang.String name)
Is the Client connected to named service. Clients may override.
Parameters:
name - The name of the service to test for.
Returns:
True if connected, false otherwise.F

Disconnect

public void Disconnect()
                throws HarmoniError
Disconnect client from all Harmoni services. Clients may override.
Throws:
HarmoniError - is thrown on error.

GetAPI

public java.lang.Object GetAPI(java.lang.String name)
Get an API object from the registry.
Parameters:
name - The name of the object to be retrieved.
Returns:
The API object.

getConfigServer

public HarmoniConfigServer getConfigServer()
Returns the config server object associated with this client.
Returns:
com.dynalivery.Harmoni.HarmoniConfigServer

getGateway

public HarmoniGateway getGateway()
Returns the gateway server object associated with this client.
Returns:
com.dynalivery.Harmoni.HarmoniGateway

getLog

public static LogService getLog()
Return the Harmoni client's log

setLog

public void setLog(LogService logger)

getServerType

public java.lang.String getServerType()

setServerType

public void setServerType(java.lang.String typ)

getHost

public static java.lang.String getHost()
Return the Harmoni client's host IP-address. Return null if the address cannot be derived.
Returns:
The host IP-address, or null on error.

getName

public java.lang.String getName()
Return the client's name.
Returns:
The clients name.

getORB

public org.omg.CORBA.ORB getORB()
Return the client orb.
Returns:
The orb in use.

GetPrinterInfo

public java.lang.String[] GetPrinterInfo(java.lang.String printerName,
                                         java.lang.StringBuffer driverName,
                                         HarmoniDEVMODE devMode)
                                  throws HarmoniAPIError,
                                         HarmoniServerError
This method returns the printer Info given the Printer Name
Parameters:
printerName, - Name of the Printer as String
driverName, - Holds the Driver Name of the Printer Name given as input
HarmoniMode, - Holds the HarmoniDEVMODE of this Printer
Returns:
String[], the String array consists of set of ports supported by this printer
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

GetPrinterNames

public java.lang.String[] GetPrinterNames()
                                   throws HarmoniAPIError,
                                          HarmoniServerError
This method returns the names of the printers attached to the report server
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

getServer

public HarmoniServer getServer()
Returns the Harmoniserver object associated with this client.
Returns:
com.dynalivery.harmoni.HarmoniServer

GetService

public HarmoniService GetService(java.lang.String name)
Get a service from the client's registry.
Parameters:
name - The name of the service requested.
Returns:
The matching service, or null on error.

OpenWordEngine

public WordEngine OpenWordEngine()
                          throws HarmoniError
Acquire a print-engine for this client.
Returns:
The new HarmoniEngine object.
Throws:
HarmoniError - is thrown on error

OpenCrystalEngine

public PCREEngine OpenCrystalEngine()
                             throws HarmoniError
Acquire a print-engine for this client.
Returns:
The new HarmoniEngine object.
Throws:
HarmoniError - is thrown on error

PutAPI

public void PutAPI(java.lang.String name,
                   java.lang.Object api)
Put an API object into the registry.
Parameters:
name - The name of the API object.
api - The API object to be entered.

PutService

public void PutService(HarmoniService service)
Enter a Harmoni service in the client's registry. Also creates a link to this client from the service.
Parameters:
service - The service that is going to be used.

Quit

public void Quit()
Short-hand for Quit(HarmoniClient.Harmoni_OK).

Quit

public void Quit(int code)
Disconnect client from all Harmoni services. Clients should override.
Parameters:
code - The termination code.

RemoveAPI

public void RemoveAPI(java.lang.String name)
Remove an API object from the registry.
Parameters:
name - The name of the API object to be removed.

RemoveService

public void RemoveService(java.lang.String name)
Remove a service from the client's registry.
Parameters:
name - The name of the service to remove.

ResetReportServer

public void ResetReportServer(HarmoniReportServerInfo rsinfo)
                       throws HarmoniClientError,
                              HarmoniServerError

SelectReportServer

public void SelectReportServer(java.lang.String method)
                        throws HarmoniClientError,
                               HarmoniServerError
Use the Load balancer to select a Gateway by the given method.

setConfigServer

public void setConfigServer(HarmoniConfigServer newConfigServer)
Sets the config server object associated with this client.
Parameters:
newConfigServer - com.dynalivery.harmoni.HarmoniConfigServer

setGatewayServer

public void setGatewayServer(HarmoniGateway newGatewayServer)
Sets the gateway server object associated with this client.
Parameters:
newGatewayServer - com.dynalivery.harmoni.HarmoniGateway

setName

public void setName(java.lang.String name)
Set the client's name.
Parameters:
name - The new name for this client.

setReportEngineServer

public void setReportEngineServer(HarmoniServer newReportEngineServer)
Sets the Harmoniserver object associated with this client.
Parameters:
newReportEngineServer - com.dynalivery.harmoni.HarmoniServer

Terminate

public static void Terminate()
Short-hand for Terminate(Harmoni_FAIL);

Terminate

public static void Terminate(int code)
Terminate the client application.
Parameters:
code - The termination code.

setPriority

public void setPriority(int clientPriority)
Setter method for priority member.
Parameters:
clientPriority - static integer variable

getPriority

public int getPriority()
Getter method for priority member.
Returns:
priority member

setArchiveFileReturnOption

public void setArchiveFileReturnOption(boolean zipOption)
Setter method for zipFlag member.
Parameters:
zipOption - boolean

getArchiveFileReturnOption

public boolean getArchiveFileReturnOption()
Getter method for zipFlag member.
Returns:
zipFlag member

setDisableServerTimeout

public void setDisableServerTimeout(boolean timeoutFlag)
Setter method for disableServerTimeout flag.
Parameters:
disableServerTimeout - boolean

getDisableServerTimeout

public boolean getDisableServerTimeout()
Getter method for disableServerTimeout flag.
Returns:
disableServerTimeout member

getSharedORB

public static org.omg.CORBA.ORB getSharedORB()
Get the shared ORB instance.
Returns:
shrOrb

setSharedORB

public static void setSharedORB(org.omg.CORBA.ORB theSharedORB)
Set the shared ORB instance.
Parameters:
org.omg.CORBA.ORB -  

getVerbose

public boolean getVerbose()
Getter method for verbose member
Returns:
verbose

setVerbose

public void setVerbose(boolean value)
Setter method for verbose member
Parameters:
verbose -  

getClientName

public java.lang.String getClientName()
Getter method for clientName member
Returns:
clientName

setClientName

public void setClientName(java.lang.String value)
Setter method for clientName member
Parameters:
clientName -  

getFolder

public java.lang.String getFolder()
Getter method for folder member
Returns:
folder

setFolder

public void setFolder(java.lang.String value)
Setter method for folder member
Parameters:
folder -