|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsqlg2.db.client.SafeDBInterface
public final class SafeDBInterface
Wrapper for IDBInterface on the client side.
Caches transactions - creates only one transaction per thread.
Also runs activity notification thread to notify server about this client.
| Constructor Summary | |
|---|---|
SafeDBInterface(IDBInterface idb)
Constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Closes DB connection. |
SessionInfo[] |
getActiveSessions()
Returns active sessions descriptors. |
SessionInfo |
getCurrentSession()
Returns calling session descriptor |
ISimpleTransaction |
getSimpleTransaction()
Creates "simple" transaction. |
ITransaction |
getTransaction()
Creates transaction. |
java.lang.String |
getUserHost()
User host name. |
java.lang.String |
getUserLogin()
Returns user login (which was passed to IConnectionFactory.openConnection(java.lang.String, java.lang.String)). |
java.lang.Object |
getUserObject()
Returns user identifier object which was returned from AuthenticationHelper.authenticate(java.sql.Connection,String,String)
(null in case of direct authentication). |
void |
killSession(long sessionId)
|
IDBInterface |
migrateTo(IConnectionFactory conf)
Opens new DB connection to another application with same login and password. |
void |
ping()
Checks server for availability and signal that client is alive. |
void |
runProcess(ProcessFactory factory)
Creates background process on the server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SafeDBInterface(IDBInterface idb)
idb - DB connection| Method Detail |
|---|
public ISimpleTransaction getSimpleTransaction()
throws java.sql.SQLException,
java.rmi.RemoteException
IDBInterface
getSimpleTransaction in interface IDBInterfacejava.sql.SQLException
java.rmi.RemoteExceptionISimpleTransaction
public ITransaction getTransaction()
throws java.sql.SQLException,
java.rmi.RemoteException
IDBInterface
getTransaction in interface IDBInterfacejava.sql.SQLException
java.rmi.RemoteExceptionITransaction
public void ping()
throws java.rmi.RemoteException
IDBInterface
ping in interface IDBInterfacejava.rmi.RemoteException
public void close()
throws java.rmi.RemoteException
IDBInterface
close in interface IDBInterfacejava.rmi.RemoteException
public java.lang.String getUserLogin()
throws java.rmi.RemoteException
IDBInterfaceIConnectionFactory.openConnection(java.lang.String, java.lang.String)).
getUserLogin in interface IDBInterfacejava.rmi.RemoteException
public java.lang.String getUserHost()
throws java.rmi.RemoteException
IDBInterface
getUserHost in interface IDBInterfacejava.rmi.RemoteException
public java.lang.Object getUserObject()
throws java.rmi.RemoteException
IDBInterfaceAuthenticationHelper.authenticate(java.sql.Connection,String,String)
(null in case of direct authentication).
getUserObject in interface IDBInterfacejava.rmi.RemoteException
public SessionInfo[] getActiveSessions()
throws java.rmi.RemoteException
IDBInterface
getActiveSessions in interface IDBInterfacejava.rmi.RemoteException
public void killSession(long sessionId)
throws java.rmi.RemoteException
killSession in interface IDBInterfacejava.rmi.RemoteException
public SessionInfo getCurrentSession()
throws java.rmi.RemoteException
IDBInterface
getCurrentSession in interface IDBInterfacejava.rmi.RemoteException
public IDBInterface migrateTo(IConnectionFactory conf)
throws java.rmi.RemoteException,
java.sql.SQLException
IDBInterface
migrateTo in interface IDBInterfaceconf - root object of application
java.rmi.RemoteException
java.sql.SQLException
public void runProcess(ProcessFactory factory)
throws java.rmi.RemoteException,
java.sql.SQLException
IDBInterface
runProcess in interface IDBInterfacefactory - process factory
java.rmi.RemoteException
java.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||