|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectasjava.uniobjects.UniJava
UniJava
is the base class for the UniObjects for Java product. Its primary
purpose is object marshalling and enumeration, as well as instantiation of all
UniSession
objects. One UniJava
object MUST be created by every
application that uses this API.
Constructor Summary | |
---|---|
UniJava()
Constructs a UniJava object. |
Method Summary | |
---|---|
static void |
closeAllCPSessions()
|
void |
closeAllSessions()
This method will close all open sessions by going through the uniSessionsVector list and calling the UniSession.disconnect() method for each individual session. |
static void |
closeServerConnection(UniSession us)
This function physically closes given connection. |
void |
closeSession(UniSession aSession)
This method will close the session passed into it. |
protected static void |
closeSessionInternal(UniSession aSession)
|
static int |
getIdleRemoveExecInterval()
retuns Idle Remove Execution Interval. |
static int |
getIdleRemoveThreshold()
returns Idle Remove Threshold |
static int |
getMaxPoolSize()
returns Maximum Pool Size Number. |
int |
getMaxSessions()
The maximum number of open sessions that can be open. |
static int |
getMinPoolSize()
returns Minimum Pool Size Number. |
int |
getNumSessions()
The current number of open sessions that are open. |
static int |
getOpenSessionTimeOut()
returns Open Session TimeOut |
static int |
getSocketTimeout()
returns Socket Time Out |
static boolean |
getUOPooling()
returns UOJ Connection Pooling flag |
java.lang.String |
getVersionNumber()
The current version number |
protected static UniSession |
openPooledSession(java.lang.String hostname,
int hostport,
java.lang.String userid,
java.lang.String password,
java.lang.String account,
java.lang.String service,
int sslmode)
This function is called by 4 above overloaded openSession() functions. |
UniSession |
openSession()
Instantiates a new UniSession object. |
UniSession |
openSession(int sslmode)
Instantiates a new UniSession object. |
static void |
setIdleRemoveExecInterval(int pidleRemoveExecInterval)
sets Idle Remove Execution Interval. |
static void |
setIdleRemoveThreshold(int pidleRemoveThreshold)
set Idle Remove Threshold |
static void |
setMaxPoolSize(int pmaxPoolSize)
sets Maximum Pool Size Number. |
static void |
setMinPoolSize(int pminPoolSize)
sets Maximum Pool Size Number. |
static void |
setOpenSessionTimeOut(int ptimeout)
sets Open Session TimeOut |
static void |
setPoolingDebug(boolean debug)
sets Debug Level for trace. |
static void |
setSocketTimeout(int ptimeout)
sets Socket Time Out |
static void |
setUOPooling(boolean puoPooling)
sets UOJ Connection Pooling flag |
protected static void |
uniLog(java.lang.String message)
This fucntion is used to write trace log related with info |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UniJava()
UniJava
object.
Method Detail |
public static void setPoolingDebug(boolean debug)
debug
- boolean representing debug level.ON=true,OFF=falseprotected static void uniLog(java.lang.String message)
message
- String representing message contentspublic void closeAllSessions() throws asjava.unirpc.UniRPCConnectionException, UniSessionException
UniSession.disconnect()
method for each individual session. It will
then eliminate all entries from the uniSessionsVector.
UniSessionException
- is thrown if an error occurs
asjava.unirpc.UniRPCConnectionException
closeSession(asjava.uniobjects.UniSession)
public static void closeAllCPSessions() throws asjava.unirpc.UniRPCConnectionException, UniSessionException
asjava.unirpc.UniRPCConnectionException
UniSessionException
public void closeSession(UniSession aSession) throws UniSessionException
UniSession.disconnect()
method, allowing the session to properly close.
It will also remove the entry from the uniSessionsVector.
aSession
- the UniSession object that should be closed
UniSessionException
- is thrown if an error occurscloseAllSessions()
protected static void closeSessionInternal(UniSession aSession) throws UniSessionException
UniSessionException
public int getMaxSessions()
public int getNumSessions()
public java.lang.String getVersionNumber()
public UniSession openSession() throws UniSessionException
UniSession
object. It also stores the reference into
the uniSessionsVector. If an error occurs, it throws a UniSessionException
UniSessionException
- if it encounters an error during creation.public UniSession openSession(int sslmode) throws UniSessionException
UniSession
object. It also stores the reference into
the uniSessionsVector. If an error occurs, it throws a UniSessionException
UniSessionException
- if it encounters an error during creation.public static void closeServerConnection(UniSession us) throws UniSessionException
us
- UniSession Object
UniSessionException
- is thrown if an error occursprotected static UniSession openPooledSession(java.lang.String hostname, int hostport, java.lang.String userid, java.lang.String password, java.lang.String account, java.lang.String service, int sslmode) throws UniSessionException
hostname
- String representing the name of the host to connect touserid
- String representing the server-side username used for connection purposes.password
- String representing the password to be used for the connectionaccount
- String representing which account to connect toservice
- String representing the datasource type.sslmode
- Integer representing the ssl mode.
UniSessionException
- is thrown if an error occurspublic static int getIdleRemoveExecInterval()
public static void setIdleRemoveExecInterval(int pidleRemoveExecInterval)
public static int getIdleRemoveThreshold()
public static void setIdleRemoveThreshold(int pidleRemoveThreshold)
public static int getSocketTimeout()
public static void setSocketTimeout(int ptimeout)
public static int getOpenSessionTimeOut()
public static void setOpenSessionTimeOut(int ptimeout)
public static boolean getUOPooling()
public static void setUOPooling(boolean puoPooling)
public static int getMaxPoolSize()
public static void setMaxPoolSize(int pmaxPoolSize)
public static int getMinPoolSize()
public static void setMinPoolSize(int pminPoolSize)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |