|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.autonomy.aci.AciConnectionDetails
Used to define the host, port, retries, timeout and encoding details of a connection to an ACI server.
Field Summary | |
static java.lang.String |
DEFAULT_ENCODING
The default character encoding to use when communicating with ACI servers (utf-8). |
static int |
DEFAULT_RETRIES
The default number of retries to use when attempting to communicate with ACI servers (5). |
static int |
DEFAULT_TIMEOUT
The default timeout period to use when attempting to communicate with ACI servers (10000ms). |
Constructor Summary | |
AciConnectionDetails()
|
Method Summary | |
java.lang.Object |
clone()
Create a new AciConnectionDetails object with the same connection details as this
one. |
java.lang.String |
getCharacterEncoding()
Read the character encoding being used when communicating with the ACI server. |
java.lang.String |
getHost()
Returns the host name for this connection. |
int |
getPort()
Returns the port being used for this connection. |
int |
getRetries()
Get the number of times a connection with the server is attempted before abandoning the request. |
java.lang.String |
getServerName()
Returns the name of the ACI server. |
int |
getTimeout()
Reads the timeout to be used when waiting for a response from the server. |
void |
setCharacterEncoding(java.lang.String sEncoding)
Set the character encoding used when communicating with the ACI server. |
void |
setHost(java.lang.String sHost)
Set the name of the machine hosting the ACI server. |
void |
setPort(int nPort)
Set the port to use when connecting to the ACI port of the ACI server. |
void |
setRetries(int nRetries)
Set the number of times a connection with the server is attempted before exiting. |
void |
setServerName(java.lang.String sServerName)
Set the name of the ACI server that these connection details point to. |
void |
setTimeout(int nTimeout)
Sets the timeout to be used when waiting for a response from the server. |
java.lang.String |
toString()
Lists the connection details set on the object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_ENCODING
The default character encoding to use when communicating with ACI servers (utf-8).
public static final int DEFAULT_RETRIES
The default number of retries to use when attempting to communicate with ACI servers (5).
public static final int DEFAULT_TIMEOUT
The default timeout period to use when attempting to communicate with ACI servers (10000ms).
Constructor Detail |
public AciConnectionDetails()
Method Detail |
public void setServerName(java.lang.String sServerName)
Set the name of the ACI server that these connection details point to. It is not necessary to set this value but can be useful in debugging (the server name is then used within any exception message relating to this connection).
sServerName
- the ACI server name.public void setHost(java.lang.String sHost)
Set the name of the machine hosting the ACI server.
sHost
- the machine name, either in either IP or host name format.public void setPort(int nPort)
Set the port to use when connecting to the ACI port of the ACI server.
nPort
- the ACI port number of the ACI server. This must be 0 < nPort
< 65536 (2^16).public void setRetries(int nRetries)
Set the number of times a connection with the server is attempted before exiting.
nRetries
- the number of times a connection with the server is attempted before
abandoning the request.public void setTimeout(int nTimeout)
Sets the timeout to be used when waiting for a response from the server.
nTimeout
- the time in milliseconds. A time of 0 means wait indefinitely.public void setCharacterEncoding(java.lang.String sEncoding)
Set the character encoding used when communicating with the ACI server. This affects both the encoding used when URL encoding action parameters and the encoding used by the underlying sockets to convert from strings to byte streams.
sEncoding
- the encoding to use.public java.lang.String getServerName()
Returns the name of the ACI server.
public java.lang.String getHost()
Returns the host name for this connection.
public int getPort()
Returns the port being used for this connection.
public int getRetries()
Get the number of times a connection with the server is attempted before abandoning the request. The default value is 5.
public int getTimeout()
Reads the timeout to be used when waiting for a response from the server. The default value is 10000ms.
public java.lang.String getCharacterEncoding()
Read the character encoding being used when communicating with the ACI server. The default value is "utf-8".
public java.lang.Object clone()
AciConnectionDetails
object with the same connection details as this
one.
this
object.public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |