com.progress.open4gl.javaproxy
Class Connection

java.lang.Object
  |
  +--com.progress.open4gl.javaproxy.Connection
All Implemented Interfaces:
com.progress.open4gl.dynamicapi.IPoolProps

public class Connection
extends java.lang.Object
implements com.progress.open4gl.dynamicapi.IPoolProps


Field Summary
 
Fields inherited from interface com.progress.open4gl.dynamicapi.IPoolProps
_APPLICATION_UUID, _APPSERVER_VERSION, _APPSERVICE_CONNECTION_MODE, _APPSERVICE_HOST, _APPSERVICE_NAME, _APPSERVICE_PORT, _APPSERVICE_PROTOCOL, _CONNECTION_LIFETIME, _ENABLE_TRACING, _IDLE_SESSION_TIMEOUT, _INITIAL_SESSIONS, _LOGFILE_NAME, _LOGGING_ENTRY_TYPES, _MAX_SESSIONS, _MIN_IDLE_CONNECTIONS, _MIN_SESSIONS, _NS_CLIENT_MAX_PORT, _NS_CLIENT_MIN_PORT, _NS_CLIENT_PICKLIST, _NS_CLIENT_PICKLIST_EXP, _NS_CLIENT_RETRY, _NS_CLIENT_RETRY_INTERVAL, _PROXY_HOST, _PROXY_PASSWORD, _PROXY_PORT, _PROXY_USERID, _REQUEST_WAIT_TIMEOUT, _RUNTIME_PROPERTY_VERSION, _SERVICE_AVAILABLE, _SERVICE_FAULT_LEVEL, _SERVICE_LOGGING_ENTRIES, _SERVICE_LOGGING_ENTRY_TYPES, _SERVICE_LOGGING_LEVEL, _SESSION_APPSERVERINFO, _SESSION_PASSWORD, _SESSION_URL, _SESSION_USERID, _SOCKET_TIMEOUT, _SSL_APPLET_CERTIFICATE_STORE, _SSL_CERTIFICATE_STORE, _SSL_NO_HOST_VERIFY, _SSL_NO_SESSION_REUSE, _SSL_WIN_CERTIFICATE_STORE, _STALE_OBJECT_TIMEOUT, _TRACE_LEVEL, _WAIT_IF_BUSY, APPLICATION_UUID, APPSERVICE_CONNECTION_MODE, APPSERVICE_HOST, APPSERVICE_NAME, APPSERVICE_PORT, APPSERVICE_PROTOCOL, CONNECTION_LIFETIME, defaultPropNames, ENABLE_TRACING, HTTP_TIMEOUT, IDLE_SESSION_TIMEOUT, INITIAL_SESSIONS, LOGFILE_NAME, LOGGING_ENTRY_TYPES, MAX_SESSIONS, MIN_IDLE_CONNECTIONS, MIN_SESSIONS, NS_CLIENT_MAX_PORT, NS_CLIENT_MIN_PORT, NS_CLIENT_PICKLIST, NS_CLIENT_PICKLIST_EXP, NS_CLIENT_RETRY, NS_CLIENT_RETRY_INTERVAL, PROPNAME_PREFIX, PROXY_HOST, PROXY_PASSWORD, PROXY_PORT, PROXY_USERID, REQUEST_WAIT_TIMEOUT, ROOT, RUNTIME_PROPERTY_VERSION, runtimePropNames, serialVersionUID, SERVICE_AVAILABLE, SERVICE_FAULT_LEVEL, SERVICE_LOGGING_ENTRIES, SERVICE_LOGGING_ENTRY_TYPES, SERVICE_LOGGING_LEVEL, SESSION_APPSERVERINFO, SESSION_PASSWORD, SESSION_POOL_NAME, SESSION_URL, SESSION_USERID, sessionFreePropNames, sessionManagedPropNames, SM_SESSION_FREE, SM_SESSION_MANAGED, SOCKET_TIMEOUT, SSL_CERTIFICATE_STORE, SSL_NO_HOST_VERIFY, SSL_NO_SESSION_REUSE, STALE_OBJECT_TIMEOUT, TRACE_LEVEL, WAIT_IF_BUSY, X_APPSERVICE_CONNECTION_MODE, X_APPSERVICE_HOST, X_APPSERVICE_NAME, X_APPSERVICE_PORT, X_APPSERVICE_PROTOCOL, X_CONNECTION_LIFETIME, X_IDLE_SESSION_TIMEOUT, X_INITIAL_SESSIONS, X_MAX_SESSIONS, X_MIN_IDLE_CONNECTIONS, X_MIN_SESSIONS, X_NS_CLIENT_MAX_PORT, X_NS_CLIENT_MIN_PORT, X_NS_CLIENT_PICKLIST, X_NS_CLIENT_PICKLIST_EXP, X_NS_CLIENT_RETRY, X_NS_CLIENT_RETRY_INTERVAL, X_REQUEST_WAIT_TIMEOUT, X_SERVICE_AVAILABLE, X_SERVICE_FAULT_LEVEL, X_SERVICE_LOGGING_ENTRIES, X_SERVICE_LOGGING_ENTRY_TYPES, X_SERVICE_LOGGING_LEVEL, X_SSL_NO_HOST_VERIFY, X_SSL_NO_SESSION_REUSE, X_STALE_OBJECT_TIMEOUT, X_WAIT_IF_BUSY, XML_TYPE
 
Constructor Summary
Connection(Connection parent)
           
Connection(java.lang.String userId, java.lang.String password, java.lang.String appServerInfo)
           
Connection(java.lang.String urlString, java.lang.String userId, java.lang.String password, java.lang.String appServerInfo)
           
 
Method Summary
 void addReference(com.progress.open4gl.dynamicapi.SessionPool sessionPool)
           
 void finalize()
           
 java.lang.String getAppServerInfo()
           
 java.util.Properties getAsProperties()
           
 boolean getBooleanProperty(java.lang.String propName)
           
 java.lang.String getCertificateStore()
          Method Returns the certicate store list
 int getConnectionLifetime()
          Method Returns the connection lifetime
 int getIdleConnectionTimeout()
          Method Returns the Idle Connection Timeout
 int getInitialConnections()
          Method Returns the number of initial connections to be made
 int getIntProperty(java.lang.String propName)
           
 java.lang.String getLogEntryTypes()
          Method Returns the log entry types
 java.lang.String getLogfileName()
          Method Returns the logfileName
 long getLongProperty(java.lang.String propName)
           
 int getMaxConnections()
          Method Returns the maximum number of connections to be made
 int getMinConnections()
          Method Returns the minimum number of connections to be made
 boolean getNoHostVerify()
          Method returns the optional HTTPS (SSL) server domain authentication .
 boolean getNoSslSessionReuse()
          Get the current state of SSL session reuse.
 int getNsClientMaxPort()
          Method Returns the maximum nameserver client port
 int getNsClientMinPort()
          Method Returns the minimum nameserver client port
 int getNsClientPicklistSize()
          Method Returns the number of broker definitions the nameserver client should retrieve from the nameserver each time
 int getNsClientPortRetry()
          Method Returns the number of times the nameserver client should retry connecting to the nameserver
 int getNsClientPortRetryInterval()
          Method Returns the number of seconds the nameserver client should wait between retrying to connect to the nameserver
 java.lang.String getPassword()
           
 java.util.Hashtable getProperties()
           
 java.lang.Object getProperty(java.lang.String propName)
           
 java.lang.String getProxyHost()
          Method Returns the proxy host
 java.lang.String getProxyPassword()
          Method Returns the proxy authentication password
 int getProxyPort()
          Method Returns the proxy port
 java.lang.String getProxyUserId()
          Method Returns the proxy authentication user-id
 int getRequestWaitTimeout()
          Method Returns the number of seconds the client should wait for a connection to become available to run a request
 int getSessionModel()
          Method Returns the session model
 com.progress.open4gl.dynamicapi.SessionPool getSessionPool()
           
 java.lang.String getStringProperty(java.lang.String propName)
           
 int getTraceLevel()
          Method Returns the trace level
 java.lang.String getUrl()
           
 java.lang.String getUserId()
           
 java.lang.String getUUID()
          Method Returns the uuid
 boolean getWaitIfBusy()
          Returns the current "Wait If Busy" setup.
 void releaseConnection()
           
 void setAppServerInfo(java.lang.String appServerInfo)
           
 java.lang.Object setBooleanProperty(java.lang.String propName, boolean propValue)
           
 void setCertificateStore(java.lang.String certStoreList)
          Method Set the CertificateStore.
 void setConnectionLifetime(int nSeconds)
          Method Set the connection lifetime
 void setIdleConnectionTimeout(int nSeconds)
          Method Set the Idle Connection Timeout
 void setInitialConnections(int nConnections)
          Method Set the number of initial connections to be made
 java.lang.Object setIntProperty(java.lang.String propName, int propValue)
           
 void setLogEntryTypes(java.lang.String logEntryTypes)
          Method sets the logEntryTypes
 void setLogfileName(java.lang.String logfileName)
          Method sets the logfileName
 java.lang.Object setLongProperty(java.lang.String propName, long propValue)
           
 void setMaxConnections(int nMaxConnections)
          Method Set the maximum number of connections to be made
 void setMinConnections(int nMinConnections)
          Method Set the minimum number of connections to be made
 void setNoHostVerify(boolean trueFalseState)
          Method sets the optional HTTPS (SSL) server domain authentication option.
 void setNoSslSessionReuse(boolean trueFalseState)
          Turns on or off SSL session reuse.
 void setNoWaitIfBusy()
          Method calls will throw an exception if the connection is busy.
 void setNsClientMaxPort(int port)
          Method Set the maximum nameserver client port
 void setNsClientMinPort(int port)
          Method Set the minimum nameserver client port
 void setNsClientPicklistSize(int nPicklistSize)
          Method sets the number of broker definitions the nameserver client should retrieve from the nameserver each time
 void setNsClientPortRetry(int nRetries)
          Method sets the number of times the nameserver client should retry connecting to the nameserver
 void setNsClientPortRetryInterval(int nSeconds)
          Method sets the number of seconds the nameserver client should wait between retrying to connect to the nameserver
 void setPassword(java.lang.String password)
           
 void setProperties(java.util.Properties props)
           
 void setProperty(java.lang.String propName, java.lang.Object propValue)
           
 void setProxyHost(java.lang.String host)
          Method Set the proxy host.
 void setProxyPassword(java.lang.String pwd)
          Method Set the proxy user-id's password.
 void setProxyPort(int port)
          Method Set the proxy port.
 void setProxyUserId(java.lang.String userId)
          Method Set the proxy user id.
 void setRequestWaitTimeout(int nRqWaitSec)
          Method sets the number of seconds the client should wait for a connection to become available to run a request
 void setSessionModel(int model)
          Method Set the sessionModel
 java.lang.Object setStringProperty(java.lang.String propName, java.lang.String propValue)
           
 void setTraceLevel(int traceLevel)
          Method sets the traceLevel
 void setUrl(java.lang.String url)
           
 void setUserId(java.lang.String userid)
           
 void setUUID(java.lang.String uuid)
          Method sets the uuid
 void setWaitIfBusy()
          Method calls will wait if the connection is busy.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connection

public Connection(Connection parent)

Connection

public Connection(java.lang.String userId,
                  java.lang.String password,
                  java.lang.String appServerInfo)

Connection

public Connection(java.lang.String urlString,
                  java.lang.String userId,
                  java.lang.String password,
                  java.lang.String appServerInfo)
Method Detail

addReference

public void addReference(com.progress.open4gl.dynamicapi.SessionPool sessionPool)
Specified by:
addReference in interface com.progress.open4gl.dynamicapi.IPoolProps

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object

getAppServerInfo

public java.lang.String getAppServerInfo()

getAsProperties

public java.util.Properties getAsProperties()
Specified by:
getAsProperties in interface com.progress.open4gl.dynamicapi.IPoolProps

getBooleanProperty

public boolean getBooleanProperty(java.lang.String propName)
Specified by:
getBooleanProperty in interface com.progress.open4gl.dynamicapi.IPoolProps

getCertificateStore

public java.lang.String getCertificateStore()
Method Returns the certicate store list

Returns:
The certicate store list as a comma separated string of directory/file values.

getConnectionLifetime

public int getConnectionLifetime()
Method Returns the connection lifetime

Returns:
int connectionLifetime

getIdleConnectionTimeout

public int getIdleConnectionTimeout()
Method Returns the Idle Connection Timeout

Returns:
int idleConnectionTimeout

getInitialConnections

public int getInitialConnections()
Method Returns the number of initial connections to be made

Returns:
int initialConnections

getIntProperty

public int getIntProperty(java.lang.String propName)
Specified by:
getIntProperty in interface com.progress.open4gl.dynamicapi.IPoolProps

getLogEntryTypes

public java.lang.String getLogEntryTypes()
Method Returns the log entry types

Returns:
string logEntryTypes

getLogfileName

public java.lang.String getLogfileName()
Method Returns the logfileName

Returns:
String logfileName

getLongProperty

public long getLongProperty(java.lang.String propName)
Specified by:
getLongProperty in interface com.progress.open4gl.dynamicapi.IPoolProps

getMaxConnections

public int getMaxConnections()
Method Returns the maximum number of connections to be made

Returns:
int maxConnections

getMinConnections

public int getMinConnections()
Method Returns the minimum number of connections to be made

Returns:
int minConnections

getNoHostVerify

public boolean getNoHostVerify()
Method returns the optional HTTPS (SSL) server domain authentication . option value.

Returns:
The boolean value HTTP/S authentication bitmask

getNoSslSessionReuse

public boolean getNoSslSessionReuse()
Get the current state of SSL session reuse.

Returns:
a boolean value

getNsClientMaxPort

public int getNsClientMaxPort()
Method Returns the maximum nameserver client port

Returns:
int nsClientMaxPort

getNsClientMinPort

public int getNsClientMinPort()
Method Returns the minimum nameserver client port

Returns:
int nsClientMinPort

getNsClientPicklistSize

public int getNsClientPicklistSize()
Method Returns the number of broker definitions the nameserver client should retrieve from the nameserver each time

Returns:
int nPickListSize

getNsClientPortRetry

public int getNsClientPortRetry()
Method Returns the number of times the nameserver client should retry connecting to the nameserver

Returns:
int nRetries

getNsClientPortRetryInterval

public int getNsClientPortRetryInterval()
Method Returns the number of seconds the nameserver client should wait between retrying to connect to the nameserver

Returns:
int nSeconds

getPassword

public java.lang.String getPassword()

getProperties

public java.util.Hashtable getProperties()

getProperty

public java.lang.Object getProperty(java.lang.String propName)
Specified by:
getProperty in interface com.progress.open4gl.dynamicapi.IPoolProps

getProxyHost

public java.lang.String getProxyHost()
Method Returns the proxy host

Returns:
Proxy host

getProxyPassword

public java.lang.String getProxyPassword()
Method Returns the proxy authentication password

Returns:
String user-id's password

getProxyPort

public int getProxyPort()
Method Returns the proxy port

Returns:
Proxy port

getProxyUserId

public java.lang.String getProxyUserId()
Method Returns the proxy authentication user-id

Returns:
String user-id

getRequestWaitTimeout

public int getRequestWaitTimeout()
Method Returns the number of seconds the client should wait for a connection to become available to run a request

Returns:
int nRqWaitSec

getSessionModel

public int getSessionModel()
Method Returns the session model

Returns:
int session model

getSessionPool

public com.progress.open4gl.dynamicapi.SessionPool getSessionPool()
Specified by:
getSessionPool in interface com.progress.open4gl.dynamicapi.IPoolProps

getStringProperty

public java.lang.String getStringProperty(java.lang.String propName)
Specified by:
getStringProperty in interface com.progress.open4gl.dynamicapi.IPoolProps

getTraceLevel

public int getTraceLevel()
Method Returns the trace level

Returns:
int traceLevel

getUrl

public java.lang.String getUrl()

getUserId

public java.lang.String getUserId()

getUUID

public java.lang.String getUUID()
Method Returns the uuid

Returns:
String uuid

getWaitIfBusy

public boolean getWaitIfBusy()
Returns the current "Wait If Busy" setup. Returns false by default or if setNoWaitIfBusy() was called. Returns true if setWaitIfBusy() was called.

See Also:
setWaitIfBusy(), setNoWaitIfBusy()

releaseConnection

public void releaseConnection()
                       throws Open4GLException
Specified by:
releaseConnection in interface com.progress.open4gl.dynamicapi.IPoolProps
Open4GLException

setAppServerInfo

public void setAppServerInfo(java.lang.String appServerInfo)

setBooleanProperty

public java.lang.Object setBooleanProperty(java.lang.String propName,
                                           boolean propValue)
Specified by:
setBooleanProperty in interface com.progress.open4gl.dynamicapi.IPoolProps

setCertificateStore

public void setCertificateStore(java.lang.String certStoreList)
                         throws Open4GLException
Method Set the CertificateStore. Allows the developer to specify storage locations for digital certificates. These are used when the AppServer connect URL uses the https protocol.

Parameters:
certStoreList - Directory and/or file name[s]. If more than one directory/file is specified then the list will be separated by semi-colons. The format of the parameter is "/file:password" and/or ":password". Password may have the word 'null' in place of an actual password.
Open4GLException

setConnectionLifetime

public void setConnectionLifetime(int nSeconds)
Method Set the connection lifetime

Parameters:
nSeconds - connectionLifetime

setIdleConnectionTimeout

public void setIdleConnectionTimeout(int nSeconds)
Method Set the Idle Connection Timeout

Parameters:
nSeconds - Idle Connection Timeout

setInitialConnections

public void setInitialConnections(int nConnections)
Method Set the number of initial connections to be made

Parameters:
nConnections - number of connections

setIntProperty

public java.lang.Object setIntProperty(java.lang.String propName,
                                       int propValue)
Specified by:
setIntProperty in interface com.progress.open4gl.dynamicapi.IPoolProps

setLogEntryTypes

public void setLogEntryTypes(java.lang.String logEntryTypes)
Method sets the logEntryTypes

Parameters:
logEntryTypes - the log entry types

setLogfileName

public void setLogfileName(java.lang.String logfileName)
Method sets the logfileName

Parameters:
logfileName - the logfileName

setLongProperty

public java.lang.Object setLongProperty(java.lang.String propName,
                                        long propValue)
Specified by:
setLongProperty in interface com.progress.open4gl.dynamicapi.IPoolProps

setMaxConnections

public void setMaxConnections(int nMaxConnections)
Method Set the maximum number of connections to be made

Parameters:
nMaxConnections - maximum number of connections

setMinConnections

public void setMinConnections(int nMinConnections)
Method Set the minimum number of connections to be made

Parameters:
nMinConnections - minimum number of connections

setNoHostVerify

public void setNoHostVerify(boolean trueFalseState)
                     throws Open4GLException
Method sets the optional HTTPS (SSL) server domain authentication option.

Parameters:
trueFalseState - The boolean value that holds the new authentication state.
Open4GLException

setNoSslSessionReuse

public void setNoSslSessionReuse(boolean trueFalseState)
                          throws Open4GLException
Turns on or off SSL session reuse.

Parameters:
trueFalseState - a boolean value
Throws:
Open4GLException - if an error occurs

setNoWaitIfBusy

public void setNoWaitIfBusy()
Method calls will throw an exception if the connection is busy. If setNoWaitIfBusy() was called then A BusySessionException will be thrown for an attempt to execute a method while the connection is busy.

See Also:
setWaitIfBusy()

setNsClientMaxPort

public void setNsClientMaxPort(int port)
Method Set the maximum nameserver client port

Parameters:
port - port number

setNsClientMinPort

public void setNsClientMinPort(int port)
Method Set the minimum nameserver client port

Parameters:
port - port number

setNsClientPicklistSize

public void setNsClientPicklistSize(int nPicklistSize)
Method sets the number of broker definitions the nameserver client should retrieve from the nameserver each time


setNsClientPortRetry

public void setNsClientPortRetry(int nRetries)
Method sets the number of times the nameserver client should retry connecting to the nameserver

Parameters:
nRetries - number of retries

setNsClientPortRetryInterval

public void setNsClientPortRetryInterval(int nSeconds)
Method sets the number of seconds the nameserver client should wait between retrying to connect to the nameserver

Parameters:
nSeconds - number of seconds

setPassword

public void setPassword(java.lang.String password)

setProperties

public void setProperties(java.util.Properties props)

setProperty

public void setProperty(java.lang.String propName,
                        java.lang.Object propValue)
Specified by:
setProperty in interface com.progress.open4gl.dynamicapi.IPoolProps

setProxyHost

public void setProxyHost(java.lang.String host)
                  throws Open4GLException
Method Set the proxy host. Used if a proxy server is known to be in between the Open Client and the Internet.

Parameters:
host - The host name
Open4GLException

setProxyPassword

public void setProxyPassword(java.lang.String pwd)
                      throws Open4GLException
Method Set the proxy user-id's password. Used if a proxy server is known to be in between the Open Client and the Internet and it requires HTTP Basic authentication.

Parameters:
pwd - The user-id password for authentication
Open4GLException

setProxyPort

public void setProxyPort(int port)
                  throws Open4GLException
Method Set the proxy port. Used if a proxy server is known to be in between the Open Client and the Internet.

Parameters:
port - The port number
Open4GLException

setProxyUserId

public void setProxyUserId(java.lang.String userId)
                    throws Open4GLException
Method Set the proxy user id. Used if a proxy server is known to be in between the Open Client and the Internet and it requires HTTP Basic authentication.

Parameters:
userId - The userId for authentication
Open4GLException

setRequestWaitTimeout

public void setRequestWaitTimeout(int nRqWaitSec)
Method sets the number of seconds the client should wait for a connection to become available to run a request

Parameters:
nRqWaitSec - number of seconds

setSessionModel

public void setSessionModel(int model)
Method Set the sessionModel

Parameters:
model - The sessionModel

setStringProperty

public java.lang.Object setStringProperty(java.lang.String propName,
                                          java.lang.String propValue)
Specified by:
setStringProperty in interface com.progress.open4gl.dynamicapi.IPoolProps

setTraceLevel

public void setTraceLevel(int traceLevel)
Method sets the traceLevel

Parameters:
traceLevel - the trace level

setUrl

public void setUrl(java.lang.String url)

setUserId

public void setUserId(java.lang.String userid)

setUUID

public void setUUID(java.lang.String uuid)
Method sets the uuid


setWaitIfBusy

public void setWaitIfBusy()
Method calls will wait if the connection is busy. If setWaitIfBusy() was called then a request to execute a method in an Application Object, a subApplication Object or a Procedure Object will wait until the connection is not busy. The connection is busy while another method is executing or while there is an open output result set. By default, setNoWaitIfBusy() is on (a BusySessionException method is thrown).

See Also:
setNoWaitIfBusy()