|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectasjava.uniclientlibs.UniConnection
UniConnection
acts as the central object for any database connection,
controlling access to any network related elements. It controls information regarding
the connection. It cannot be instantiated by itself, but instead is used as the
foundation for other connection/session objects, such as the UniSession object.
Field Summary | |
---|---|
protected java.lang.String |
accountPath
|
protected int |
compressionThreshold
|
asjava.unirpc.UniRPCConnection |
connection
|
protected int |
encryptionType
|
protected java.lang.String |
hostName
|
protected int |
hostPort
|
protected int |
hostType
|
protected asjava.unirpc.UniRPCPacket |
inPacket
|
protected boolean |
isActive
|
protected boolean |
isNLSEnabled
|
protected boolean |
isNLSLocalesEnabled
|
protected boolean |
isNLSUnidataSession
|
protected boolean |
isRPCError
|
protected java.lang.String |
licenseToken
|
protected asjava.unirpc.UniRPCPacket |
outPacket
|
protected java.lang.String |
password
|
protected java.lang.String |
proxyHost
|
protected int |
proxyPort
|
protected java.lang.String |
proxySecurityToken
|
protected int |
timeout
|
protected int |
transport
|
protected java.lang.String |
uniConnectionString
|
protected java.lang.String |
uniDataSourceType
|
protected java.lang.String[] |
uniMarkCharacters
|
protected java.lang.String |
uniSubKey
|
protected java.lang.String |
userName
|
Constructor Summary | |
---|---|
UniConnection()
|
Method Summary | |
---|---|
protected java.lang.String |
encrypt(java.lang.String aString)
This method is used to encrypt a given string into an internal format that is understood by the server |
java.lang.String |
getAccountPath()
returns the account path being used for the connection |
int |
getCompressionThreshold()
returns the current CompressionThreshold . |
java.lang.String |
getConnectionString()
returns the current connection string, which is the string used to connect to a particular database type. |
java.lang.String |
getDataSourceType()
returns the current data source type, which can be either "UNIVERSE" or "UNIDATA". |
int |
getDefaultEncryptionType()
returns the current default encryption type to be used for this session. |
java.lang.String |
getDeviceSubkey()
gets the device subkey used in client-side licensing. |
java.lang.String |
getHostName()
returns the name of the host we are connecting to. |
int |
getHostPort()
returns the port number used for this connection. |
int |
getHostType()
returns a value representing the type of host the session is connected to. |
asjava.unirpc.UniRPCPacket |
getInPacket()
|
java.lang.String |
getMarkCharacter(int aMarkChar)
returns the specified mark characters. |
asjava.unirpc.UniRPCPacket |
getOutPacket()
|
java.lang.String |
getPassword()
returns the password used to establish the connection to the host system |
java.lang.String |
getProxyHost()
returns the name of the ProxyHost being used for this connection |
int |
getProxyPort()
returns the port number that the ProxyHost resides on |
java.lang.String |
getProxyToken()
returns the security string (password) used for validation on the ProxyHost |
boolean |
getRPCError()
|
int |
getServerVersion()
returns the current version of the host RPC version |
int |
getTimeout()
returns the current RPC timeout period. |
int |
getTransport()
returns the type of network transport being used. |
java.lang.String |
getUserName()
returns the current user name used for this connection |
boolean |
isActive()
boolean method that indicates true if a connection has been
successfully established. |
boolean |
isCompressionEnabled()
boolean method that indicates true if a data compression is
available for this UniSession . |
boolean |
isEncryptionEnabled()
boolean method that indicates true if data encryption is available
for this UniSession . |
boolean |
isNLSEnabled()
boolean method that indicates true if the server this object is connected
to is currently NLS enabled. |
boolean |
isNLSLocalesEnabled()
boolean method that indicates true if the server this object is connected
to is currently NLS locales enabled. |
void |
setAccountPath(java.lang.Object aAccountPath)
sets the account path to be used for the connection |
void |
setAccountPath(java.lang.String aAccountPath)
sets the account path to be used for the connection |
void |
setCompressionThresholdInt(int aCompressionThresholdVal)
sets the current CompressionThreshold value. |
void |
setConnectionString(java.lang.Object connString)
sets connection string to be used for server connection |
void |
setConnectionString(java.lang.String connString)
sets connection string to be used for server connection |
void |
setDataSourceType(java.lang.Object dataSourceType)
sets data source type to connect to. |
void |
setDataSourceType(java.lang.String dataSourceType)
sets data source type to connect to. |
void |
setDefaultEncryptionTypeInt(int aType)
sets the current default encryption type to be used for this session. |
void |
setDeviceSubkey(java.lang.Object subKey)
sets up the device subkey for use in client-side licensing. |
void |
setHostName(java.lang.Object aHostName)
sets the host name to establish the connection to. |
void |
setHostName(java.lang.String aHostName)
sets the host name to establish the connection to. |
void |
setHostPort(int aHostPort)
sets the port number the connection should connect to on the server side. |
void |
setPassword(java.lang.Object aPassword)
sets the password to be used for the server-side connection |
void |
setPassword(java.lang.String aPassword)
sets the password to be used for the server-side connection |
void |
setProxyHost(java.lang.Object aProxyHost)
sets the host name of the ProxyServer to connect to |
void |
setProxyHost(java.lang.String aProxyHost)
sets the host name of the ProxyServer to connect to |
void |
setProxyPort(int aProxyPort)
sets the port number on the ProxyServer that should be used for the connection |
void |
setProxyToken(java.lang.Object aProxyToken)
sets the ProxyServer security token (password) to be used for connection validation |
void |
setRPCError(boolean isRPCError)
|
void |
setTimeoutInt(int aTimeoutVal)
Sets the UniRPC timeout value. |
void |
setTransport(int aTransportType)
Used to establish which type of network transport should be used. |
void |
setUserName(java.lang.Object aUserName)
sets the user name that is to be used in the connection to the remote server |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public asjava.unirpc.UniRPCConnection connection
protected asjava.unirpc.UniRPCPacket inPacket
protected asjava.unirpc.UniRPCPacket outPacket
protected java.lang.String accountPath
protected java.lang.String hostName
protected java.lang.String password
protected java.lang.String userName
protected java.lang.String[] uniMarkCharacters
protected java.lang.String uniConnectionString
protected java.lang.String uniDataSourceType
protected java.lang.String proxyHost
protected java.lang.String proxySecurityToken
protected java.lang.String licenseToken
protected java.lang.String uniSubKey
protected int hostPort
protected int proxyPort
protected int transport
protected int compressionThreshold
protected int timeout
protected int encryptionType
protected int hostType
protected boolean isNLSEnabled
protected boolean isNLSLocalesEnabled
protected boolean isActive
protected boolean isRPCError
protected boolean isNLSUnidataSession
Constructor Detail |
public UniConnection()
Method Detail |
public java.lang.String getAccountPath()
setAccountPath(java.lang.Object)
public int getCompressionThreshold()
CompressionThreshold
. Whenever a data packet is transferred that exceeds the
CompressionThreshold
, it will be compressed using an internal compression algorithm. This will be
done for performance reasons. By default, it is set to 0, which represents no compression is to be done. Any
non-zero value will enable compression.
public java.lang.String getConnectionString()
setConnectionString(java.lang.Object)
public java.lang.String getDataSourceType()
setDataSourceType(java.lang.Object)
public int getDefaultEncryptionType()
setDefaultEncryptionTypeInt(int)
public java.lang.String getDeviceSubkey()
setDeviceSubkey(java.lang.Object)
public java.lang.String getHostName()
setHostName
or connect
methods.
setHostName(java.lang.String)
public int getHostPort()
setHostPort(int)
public int getHostType()
public int getServerVersion()
public java.lang.String getMarkCharacter(int aMarkChar) throws UniConnectionException
aMarkChar
- integer representing which character to obtain
UniConnectionException
- is thrown if an error occurspublic java.lang.String getPassword()
setPassword(java.lang.Object)
public java.lang.String getProxyHost()
ProxyHost
being used for this connection
ProxyHost
setProxyHost(java.lang.Object)
public int getProxyPort()
ProxyHost
resides on
setProxyPort(int)
public java.lang.String getProxyToken()
ProxyHost
setProxyToken(java.lang.Object)
public int getTimeout()
public int getTransport()
setTransport(int)
public java.lang.String getUserName()
setUserName(java.lang.Object)
public boolean isActive()
true
if a connection has been
successfully established. It is false
if the connection has not
been established.
public boolean isCompressionEnabled()
true
if a data compression is
available for this UniSession
. It is false
if the connection does not support data compression.
public boolean isEncryptionEnabled()
true
if data encryption is available
for this UniSession
. It is false
if this session does not support encryption.
public boolean isNLSEnabled()
true
if the server this object is connected
to is currently NLS enabled. It will return false
if the server is not
NLS aware.
public boolean isNLSLocalesEnabled()
true
if the server this object is connected
to is currently NLS locales enabled. It will return false
if the server is not
NLS locales aware.
public void setAccountPath(java.lang.Object aAccountPath)
aAccountPath
- object representing which account to connect togetAccountPath()
public void setAccountPath(java.lang.String aAccountPath)
aAccountPath
- String representing which account to connect togetAccountPath()
public void setCompressionThresholdInt(int aCompressionThresholdVal) throws UniConnectionException
CompressionThreshold
value.
aCompressionThresholdVal
- integer representing the amount, in bytes, to set the compression
threshold to
UniConnectionException
- is thrown if an invalid aCompressionThresholdVal is passed inpublic void setConnectionString(java.lang.Object connString)
connString
- object representing the connection string to be used.getConnectionString()
public void setConnectionString(java.lang.String connString)
connString
- string representing the connection string to be used.getConnectionString()
public void setDataSourceType(java.lang.Object dataSourceType) throws UniConnectionException
dataSourceType
- object representing the datasource type.
UniConnectionException
- is thrown is an invalid data source type is specifiedgetDataSourceType()
public void setDataSourceType(java.lang.String dataSourceType) throws UniConnectionException
dataSourceType
- string representing the datasource type.
UniConnectionException
- is thrown is an invalid data source type is specifiedgetDataSourceType()
public void setDefaultEncryptionTypeInt(int aType) throws UniConnectionException
aType
- integer representing the type of encryption that is to be used.
UniConnectionException
- is thrown if an invalid aType is passed inpublic void setDeviceSubkey(java.lang.Object subKey)
subKey
- String representing the subkey to be usedgetDeviceSubkey()
public void setHostName(java.lang.String aHostName)
aHostName
- String representing the name of the host to connect togetHostName()
public void setHostName(java.lang.Object aHostName)
aHostName
- object representing the name of the host to connect togetHostName()
public void setHostPort(int aHostPort)
aHostPort
- integer representing the hostside port number to connect togetHostPort()
public void setPassword(java.lang.Object aPassword)
aPassword
- object representing the password to be used for the connectiongetPassword()
public void setPassword(java.lang.String aPassword)
aPassword
- String representing the password to be used for the connectiongetPassword()
public void setProxyHost(java.lang.Object aProxyHost)
aProxyHost
- object representing the name of the ProxyServer to connect togetProxyHost()
public void setProxyHost(java.lang.String aProxyHost)
aProxyHost
- String representing the name of the ProxyServer to connect togetProxyHost()
public void setProxyPort(int aProxyPort)
aProxyPort
- integer reprenting the port number that should be used for the connection
to the ProxyServer.getProxyPort()
public void setProxyToken(java.lang.Object aProxyToken)
aProxyToken
- String representing the secutiry token (password) to be used for connection validationgetProxyToken()
public void setTimeoutInt(int aTimeoutVal) throws UniConnectionException
aTimeoutVal
- integer representing the number of seconds the UniRPC should wait until it times out.
UniConnectionException
- is thrown if the timeout cannot be setpublic void setTransport(int aTransportType)
aTransportType
- integer representing the type of network transport should be used.getTransport()
public void setUserName(java.lang.Object aUserName)
aUserName
- String representing the server-side username used for connection purposes.getUserName()
,
UniSession.connect()
protected java.lang.String encrypt(java.lang.String aString)
public asjava.unirpc.UniRPCPacket getInPacket()
public asjava.unirpc.UniRPCPacket getOutPacket()
public boolean getRPCError()
public void setRPCError(boolean isRPCError)
isRPCError
- The isRPCError to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |