|
DigiStamp.com | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.digistamp.tsp.TSAConfig
public class TSAConfig
Configures the user's preferences for using the Internet to communicate with
DigiStamp time stamp servers. The configuration includes, for example, which
time servers to use and rules for fail-over to alternative servers.
This configuration data-object can be specified uniquely for each call to the
DigiStamp server. Or, you can set a "global" configuration for all calls to
the server (see:
com.digistamp.tsp.DgsComm#setGlobalConfig(com.digistamp.tsp.TSAConfig)
).
The configuration data can be read from a file (see:
readFile(String)). An example of the file's contents:
acctId = 1612
passwordClear = yourPassword
sslFlag = false
listOfServers.0 = tsatest1
listOfServers.1 = tsatest2
roundRobin = true
retryNum = 3
traceFlag = false
rootCertificatePath = DigiStamp.cer
Any particular field value that is not specified will have the default value as described in the field description below.
| Field Summary | |
|---|---|
static java.lang.String |
defaultConfigFileName
The default name of the file that holds the configuration data. |
static int |
listSize
Maximim size of setListOfServers(String[]). |
java.util.Properties |
storageProperties
|
| Constructor Summary | |
|---|---|
TSAConfig()
Constructor |
|
TSAConfig(java.io.FileInputStream in)
Constructor |
|
TSAConfig(java.util.Properties props)
Constructor |
|
TSAConfig(TSAConfig orig)
Copy constructor |
|
| Method Summary | |
|---|---|
java.lang.String |
getAcctId()
Account number of the user at DigiStamp. |
int |
getHoldOutMinutes()
If a server did fail how long should we wait before allowing it to be tried again. |
java.lang.String[] |
getListOfServers()
The list of DigiStamp servers that will be used to create time stamps. |
byte[] |
getPassword()
The SHA-1 hash of the password is returned; |
int |
getRetryNum()
How many times should the time-stamp request be attempted. |
java.lang.String |
getRootCertificatePath()
Where is the DigiStamp root certificate stored. |
int |
getTimeOut()
How long to wait before you "timeout" waiting for a response for the DigiStamp server. |
boolean |
isRoundRobin()
Use the time-stamp servers in the list in a round-robin fashion. |
boolean |
isSslFlag()
Flag to indicate if SSL communication is to be used. |
void |
load(java.io.InputStream fis)
|
static TSAConfig |
readFile(java.lang.String fileName)
Load the value of the configuration from a file. |
void |
setAcctId(java.lang.String acctId)
Account number of the user at DigiStamp. |
void |
setHoldOutMinutes(int holdOutMinutes)
If a server did fail how long should we wait before allowing it to be tried again. |
void |
setListOfServers(java.lang.String[] listOfServers)
The list of DigiStamp servers that will be used to create time stamps. |
void |
setPasswordClear(java.lang.String password)
Password of the user. |
void |
setRetryNum(int retryNum)
How many times should the time-stamp request be attempted. |
void |
setRootCertificatePath(java.lang.String rootCertificatePath)
Where is the DigiStamp root certificate stored. |
void |
setRoundRobin(boolean roundRobin)
Use the time-stamp servers in the list in a round-robin fashion. |
void |
setSslFlag(boolean sslFlag)
Flag to indicate if SSL communication is to be used. |
void |
setTimeOut(int timeOut)
How long to wait before you "timeout" waiting for a response for the DigiStamp server. |
void |
store(java.io.OutputStream out,
java.lang.String comments)
Write the current set of properties. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String defaultConfigFileName
readFile(String)when the user provides no other file
name.
public static final int listSize
setListOfServers(String[]). The value is 16 and
cannot be changed.
public java.util.Properties storageProperties
| Constructor Detail |
|---|
public TSAConfig()
public TSAConfig(java.io.FileInputStream in)
throws java.io.IOException
java.io.IOExceptionpublic TSAConfig(java.util.Properties props)
public TSAConfig(TSAConfig orig)
| Method Detail |
|---|
public java.lang.String getAcctId()
public int getHoldOutMinutes()
public java.lang.String[] getListOfServers()
setListOfServers(String[]) for details.
public byte[] getPassword()
public int getRetryNum()
setRetryNum(int)
public java.lang.String getRootCertificatePath()
https://support.digistamp.com/pubCerts.htm
public int getTimeOut()
setTimeOut(int)
public boolean isRoundRobin()
setRoundRobin(boolean) for details.
public boolean isSslFlag()
for details.
public void load(java.io.InputStream fis)
throws java.io.FileNotFoundException,
java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public static TSAConfig readFile(java.lang.String fileName)
throws java.io.FileNotFoundException,
java.io.IOException
If you call this method with the value of null then the
processing will attempt to use the file specified by
DgsConfig.defaultConfigFileName in the current working
directory.
fileName - String - file name. fully qualified or processing assumes
current working directory
java.io.FileNotFoundException
java.io.IOExceptionpublic void setAcctId(java.lang.String acctId)
public void setHoldOutMinutes(int holdOutMinutes)
public void setListOfServers(java.lang.String[] listOfServers)
public void setPasswordClear(java.lang.String password)
Your password must be also be know/shared with the DigiStamp server. Your password at DigiStamp is established during account setup or by using the User Support section of our web site.
password - the password to setpublic void setRetryNum(int retryNum)
setListOfServers(String[]) then the next server in the list will
be accessed for the time-stamp request. A value of 0 is assumed to be the
value 1. The default is 3. Maximum is 6.
retryNum - the retryNum to setpublic void setRootCertificatePath(java.lang.String rootCertificatePath)
https://support.digistamp.com/pubCerts.htm
rootCertificatePath - the file that contains the DigiStamp root certificatepublic void setRoundRobin(boolean roundRobin)
true has no affect if there are not
multiple server names provided in the setListOfServers(String[])
. This feature would only be valuable to use if you are using the toolkit
in a multi-thread environment. In this situation, "round robin" would
allow you to execute many requests concurrently using a variety of
DigiStamp servers. Each time stamp request would still take the same
amount of time to transmit, but you would be engaging many servers. This
"high concurrency" option can be used if DigiStamp is aware of your
special processing requirements and has approved this high throughput. To
enable this feature the configuration must be set using the method
com.digistamp.tsp.DgsComm#setGlobalConfig(com.digistamp.tsp.TSAConfig)
.
roundRobin - the roundRobin to setpublic void setSslFlag(boolean sslFlag)
sslFlag - the sslFlag to setpublic void setTimeOut(int timeOut)
setRetryNum(int)
behavior is used. Specifying 0 seconds causes Internet communications to
time-out based on your operating system configuration. Using this
configuration field allows your timeout to occur in a shorter duration
that your operating system, but not longer. The minimum setting is 5
seconds. The default is set to 20 seconds.
timeOut - the timeOut to set
public void store(java.io.OutputStream out,
java.lang.String comments)
throws java.io.IOException
out - comments -
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object
|
Copyright 2000-2010 DigiStamp, Inc. | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||