com.dynalivery.saffron.client
Class SaffronCORBAClient

java.lang.Object
  extended bycom.dynalivery.saffron.client.SaffronClient
      extended bycom.dynalivery.saffron.client.SaffronCORBAClient

public class SaffronCORBAClient
extends SaffronClient

This is an implementation of the Saffron client based on CORBA


Field Summary
protected  com.dynalivery.server.DynaliveryServer dynaliveryServer
           
protected  com.dynalivery.server.log.LogReceiver logReceiver
           
protected static org.omg.CORBA.ORB orb
           
protected  com.dynalivery.server.output.OutputJob outputJob
           
protected  com.dynalivery.server.output.OutputService outputService
           
protected static org.omg.PortableServer.POA poa
           
protected  com.dynalivery.saffron.client.remoteclassloader.RemoteClassLoaderImp remoteClassLoaderImp
           
protected  java.lang.String remoteClassLoaderIOR
           
 
Fields inherited from class com.dynalivery.saffron.client.SaffronClient
appServerVendor, logService, password, properties, PROPERTY_APPSERVER_VENDOR, PROPERTY_SAFFRON_COMMAND_LINE, PROPERTY_SERVER_NAME, PROPERTY_SERVER_PORT, serverName, serverPortInt, serverPortString, serverType, snoaVersionDesired, userName
 
Constructor Summary
SaffronCORBAClient(java.util.Properties properties)
          construct a CORBA Saffron client
 
Method Summary
 void abortJob()
          Abort the active job if possible
 boolean canAbortJob()
          Returns true if we can abort an active job
 void connect(java.lang.String userName, java.lang.String password)
          Connect to the Saffron CORBA server.
protected  void connectInternal(java.lang.String userName, java.lang.String password)
          Connect to the Saffron CORBA server.
 void disconnect()
          Disconnect from the Saffron CORBA server.
 void export(FormatOptions formatOptions, SaffronInputSource[] inputSources, DestinationOptions destinationOptions)
          Export one or more documents
 com.dynalivery.common.IdentifierPair[] getDestinationList(int fid)
          getDestinationList returns the List of Destinations Supported by this Formatter.
 com.dynalivery.common.IdentifierPair[] getFormatList()
          getFormatList returns the List of OutputFormats Supported
protected  java.lang.String getIOR()
          This method returns the IOR of the Saffron server
static org.omg.PortableServer.POA getPOA()
           
protected  java.lang.String getRemoteClassLoaderIOR()
           
 boolean isConnected()
          Returns true if we are connected to Saffron
static void releaseCORBALog(com.dynalivery.server.log.LogReceiverPOA logReceiverPOA)
           
 void setCORBALog(com.dynalivery.server.log.LogReceiverPOA logReceiverPOA)
           
 void setCORBALogLevel(short logLevel)
           
 
Methods inherited from class com.dynalivery.saffron.client.SaffronClient
createSaffronClient, createSaffronCORBAClient, createSaffronEJBClient, createSaffronEmbeddedClient, getAppServerVendor, getServerName, getServerPortString, getServerType, getUserName, log, log, setClientLogService, validateServerName, validateServerPort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

orb

protected static org.omg.CORBA.ORB orb

poa

protected static org.omg.PortableServer.POA poa

dynaliveryServer

protected com.dynalivery.server.DynaliveryServer dynaliveryServer

outputService

protected com.dynalivery.server.output.OutputService outputService

outputJob

protected com.dynalivery.server.output.OutputJob outputJob

logReceiver

protected com.dynalivery.server.log.LogReceiver logReceiver

remoteClassLoaderImp

protected com.dynalivery.saffron.client.remoteclassloader.RemoteClassLoaderImp remoteClassLoaderImp

remoteClassLoaderIOR

protected java.lang.String remoteClassLoaderIOR
Constructor Detail

SaffronCORBAClient

public SaffronCORBAClient(java.util.Properties properties)
                   throws SaffronClientException
construct a CORBA Saffron client

Method Detail

connect

public void connect(java.lang.String userName,
                    java.lang.String password)
             throws SaffronClientException
Connect to the Saffron CORBA server.

Specified by:
connect in class SaffronClient
Parameters:
userName - the user name string for the current user
password - the password string for the current user in clear text
Throws:
AuthenticationException - thrown if username/password is invalid
ServerUnavailableException - thrown if server is not available
SaffronSecurityException - thrown if the specified user is not granted access to the Saffron
InvalidParameterException - thrown if any of the parameters to this method are invalid
SaffronClientException

disconnect

public void disconnect()
Disconnect from the Saffron CORBA server.

Specified by:
disconnect in class SaffronClient

isConnected

public boolean isConnected()
Returns true if we are connected to Saffron

Specified by:
isConnected in class SaffronClient
Returns:
true if we are connected to Saffron

canAbortJob

public boolean canAbortJob()
Returns true if we can abort an active job

Specified by:
canAbortJob in class SaffronClient
Returns:
true if we can abort an active job

abortJob

public void abortJob()
Abort the active job if possible

Specified by:
abortJob in class SaffronClient

getRemoteClassLoaderIOR

protected java.lang.String getRemoteClassLoaderIOR()

export

public void export(FormatOptions formatOptions,
                   SaffronInputSource[] inputSources,
                   DestinationOptions destinationOptions)
            throws SaffronClientException
Export one or more documents

Specified by:
export in class SaffronClient
Parameters:
formatOptions - the FormatOptions for this export
inputSources - a SaffronInputSource array defining the documents to be exported
destinationOptions - the DestinationOptions for this export
Throws:
SaffronClientException

getFormatList

public com.dynalivery.common.IdentifierPair[] getFormatList()
                                                     throws SaffronClientException
getFormatList returns the List of OutputFormats Supported

Specified by:
getFormatList in class SaffronClient
Returns:
IdentifierPair[]
Throws:
SaffronClientException

getDestinationList

public com.dynalivery.common.IdentifierPair[] getDestinationList(int fid)
                                                          throws SaffronClientException
getDestinationList returns the List of Destinations Supported by this Formatter.

Specified by:
getDestinationList in class SaffronClient
Parameters:
fid - the format Id for which we need the list of destinations.
Returns:
IdentifierPair[]
Throws:
SaffronClientException

connectInternal

protected void connectInternal(java.lang.String userName,
                               java.lang.String password)
                        throws SaffronClientException
Connect to the Saffron CORBA server.

Parameters:
userName - the user name string for the current user
password - the password string for the current user in clear text
Throws:
InvalidParameterException - thrown if any of the parameters to this method are invalid
SaffronClientException

setCORBALog

public void setCORBALog(com.dynalivery.server.log.LogReceiverPOA logReceiverPOA)
                 throws org.omg.PortableServer.POAPackage.ServantAlreadyActive,
                        org.omg.PortableServer.POAPackage.ObjectNotActive,
                        org.omg.PortableServer.POAPackage.WrongPolicy
Throws:
org.omg.PortableServer.POAPackage.ServantAlreadyActive
org.omg.PortableServer.POAPackage.ObjectNotActive
org.omg.PortableServer.POAPackage.WrongPolicy

setCORBALogLevel

public void setCORBALogLevel(short logLevel)

releaseCORBALog

public static void releaseCORBALog(com.dynalivery.server.log.LogReceiverPOA logReceiverPOA)

getIOR

protected java.lang.String getIOR()
                           throws SaffronServerUnavailableException,
                                  SaffronServerConnectionException,
                                  java.io.IOException
This method returns the IOR of the Saffron server

Returns:
String returns the ior of the saffron server.
Throws:
SaffronServerUnavailableException
SaffronServerConnectionException
java.io.IOException

getPOA

public static org.omg.PortableServer.POA getPOA()