|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.dynalivery.saffron.client.SaffronClient
This abstract class provides methods for accessing Saffron running as an embedded server, a CORBA server or and EJB server
| Field Summary | |
protected java.lang.String |
appServerVendor
This is the EJB appserver vendor, if any |
protected static com.dynalivery.output.log.LogService |
logService
This is the client log service, if any |
protected java.lang.String |
password
This is the current password |
protected java.util.Properties |
properties
the Saffron client properties |
static java.lang.String |
PROPERTY_APPSERVER_VENDOR
key string for EJB appserver vendor (e.g. |
static java.lang.String |
PROPERTY_SAFFRON_COMMAND_LINE
key string for Saffron command line This command line is used to start the Saffron CORBA server if necessary. |
static java.lang.String |
PROPERTY_SERVER_NAME
key string for server hostname |
static java.lang.String |
PROPERTY_SERVER_PORT
key string for server port number |
protected java.lang.String |
serverName
This is the server hostname |
protected int |
serverPortInt
This is the server port Integer |
protected java.lang.String |
serverPortString
This is the server port String |
protected int |
serverType
the Saffron server type (e.g. |
static java.lang.String |
snoaVersionDesired
the SNOA version we require for this client |
protected java.lang.String |
userName
This is the current user name |
| Constructor Summary | |
protected |
SaffronClient(java.util.Properties properties)
Construct a Saffron client with the specified properties. |
| Method Summary | |
abstract void |
abortJob()
Abort the active job if possible |
abstract boolean |
canAbortJob()
Returns true if we can abort an active job |
abstract void |
connect(java.lang.String userName,
java.lang.String password)
Connect to Saffron |
static SaffronClient |
createSaffronClient(int serverType,
java.util.Properties properties)
Create a Saffron client for specified server type |
static SaffronCORBAClient |
createSaffronCORBAClient(java.util.Properties properties)
Create a Saffron client using CORBA |
static SaffronEJBClient |
createSaffronEJBClient(java.util.Properties properties)
Create a Saffron client for the specified EJB server vendor. |
static SaffronEmbeddedClient |
createSaffronEmbeddedClient(java.util.Properties properties)
Create a Saffron client for embedded server |
abstract void |
disconnect()
Disconnect from Saffron |
abstract void |
export(FormatOptions formatOptions,
SaffronInputSource[] inputSources,
DestinationOptions destinationOptions)
Export one or more documents |
java.lang.String |
getAppServerVendor()
Returns the appserver vendor, if any |
abstract com.dynalivery.common.IdentifierPair[] |
getDestinationList(int fid)
getDestinationList returns the List of Destinations Supported by this Formatter. |
abstract com.dynalivery.common.IdentifierPair[] |
getFormatList()
getFormatList returns the List of OutputFormats Supported |
java.lang.String |
getServerName()
Returns the server name |
java.lang.String |
getServerPortString()
Returns the server port |
int |
getServerType()
Returns the Saffron server type e.g. |
java.lang.String |
getUserName()
Returns the current logged in userName, if any |
abstract boolean |
isConnected()
Returns true if we are connected to Saffron |
static void |
log(int logLevel,
java.lang.String msg)
Client side logging method |
static void |
log(int logLevel,
java.lang.String message,
java.lang.String verboseMessage)
Client side logging method |
static void |
setClientLogService(com.dynalivery.output.log.LogService _logService)
Set the client log service |
protected static void |
validateServerName(java.lang.String servername)
Validates the login host/server name |
protected static int |
validateServerPort(java.lang.String portString)
Validates the port String |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String snoaVersionDesired
public static final java.lang.String PROPERTY_APPSERVER_VENDOR
public static final java.lang.String PROPERTY_SERVER_NAME
public static final java.lang.String PROPERTY_SERVER_PORT
public static final java.lang.String PROPERTY_SAFFRON_COMMAND_LINE
protected static com.dynalivery.output.log.LogService logService
protected java.lang.String appServerVendor
protected java.lang.String serverName
protected java.lang.String serverPortString
protected int serverPortInt
protected java.lang.String userName
protected java.lang.String password
protected java.util.Properties properties
protected int serverType
| Constructor Detail |
protected SaffronClient(java.util.Properties properties)
properties - the properties for this Saffron client (e.g. PROPERTY_SERVER_NAME)| Method Detail |
public static SaffronClient createSaffronClient(int serverType,
java.util.Properties properties)
throws SaffronClientException
serverType - the integer Saffron server type (e.g. ServerType.EMBEDDED)properties - the Saffron client properties
SaffronClientException
public static SaffronEmbeddedClient createSaffronEmbeddedClient(java.util.Properties properties)
throws SaffronClientException
properties - the Saffron client properties
SaffronClientException
public static SaffronCORBAClient createSaffronCORBAClient(java.util.Properties properties)
throws SaffronClientException
properties - the Saffron client properties
SaffronClientException
public static SaffronEJBClient createSaffronEJBClient(java.util.Properties properties)
throws SaffronClientException
properties - the Saffron client properties
SaffronClientException
public abstract void connect(java.lang.String userName,
java.lang.String password)
throws SaffronClientException
userName - the user name string for the current userpassword - the password string for the current user in clear text
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
SaffronClientExceptionpublic abstract void disconnect()
public abstract boolean isConnected()
public abstract boolean canAbortJob()
public abstract void abortJob()
public abstract void export(FormatOptions formatOptions,
SaffronInputSource[] inputSources,
DestinationOptions destinationOptions)
throws SaffronClientException
formatOptions - the FormatOptions for this exportinputSources - a SaffronInputSource array defining the documents to be exporteddestinationOptions - the DestinationOptions for this export
SaffronClientException
public abstract com.dynalivery.common.IdentifierPair[] getFormatList()
throws SaffronClientException
SaffronClientException
public abstract com.dynalivery.common.IdentifierPair[] getDestinationList(int fid)
throws SaffronClientException
fid - the format Id for which we need the list of destinations.
SaffronClientExceptionpublic static void setClientLogService(com.dynalivery.output.log.LogService _logService)
_logService - the LogService to be used to log client messagespublic java.lang.String getUserName()
public java.lang.String getAppServerVendor()
public java.lang.String getServerName()
public java.lang.String getServerPortString()
public int getServerType()
protected static void validateServerName(java.lang.String servername)
throws InvalidParameterException
servername - the hostname string of the Saffron EJB server
InvalidParameterException - thrown if any of the parameters to this method are invalid
protected static int validateServerPort(java.lang.String portString)
throws InvalidParameterException
portString - the specified port String to be validated
InvalidParameterException - thrown if any of the parameters to this method are invalid
public static void log(int logLevel,
java.lang.String msg)
logLevel - integer log level of this message, e.g. LogService.LOG_WARNINGmsg - the message String to write to the client side log
public static void log(int logLevel,
java.lang.String message,
java.lang.String verboseMessage)
logLevel - integer log level of this message, e.g. LogService.LOG_WARNINGmessage - the short log message StringverboseMessage - the verbose log message String
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||