sqlg2.db
Interface IDBInterface

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
DBInterface, SafeDBInterface

public interface IDBInterface
extends java.rmi.Remote

Main DB interface class - DB connection abstraction. Can be viewed as a Connection analog, while really it can be a whole pool of connections.


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.
 

Method Detail

getSimpleTransaction

ISimpleTransaction getSimpleTransaction()
                                        throws java.rmi.RemoteException,
                                               java.sql.SQLException
Creates "simple" transaction.

Throws:
java.rmi.RemoteException
java.sql.SQLException
See Also:
ISimpleTransaction

getTransaction

ITransaction getTransaction()
                            throws java.rmi.RemoteException,
                                   java.sql.SQLException
Creates transaction.

Throws:
java.rmi.RemoteException
java.sql.SQLException
See Also:
ITransaction

ping

void ping()
          throws java.rmi.RemoteException
Checks server for availability and signal that client is alive.

Throws:
java.rmi.RemoteException

close

void close()
           throws java.rmi.RemoteException
Closes DB connection.

Throws:
java.rmi.RemoteException

getUserLogin

java.lang.String getUserLogin()
                              throws java.rmi.RemoteException
Returns user login (which was passed to IConnectionFactory.openConnection(java.lang.String, java.lang.String)).

Returns:
user login
Throws:
java.rmi.RemoteException

getUserHost

java.lang.String getUserHost()
                             throws java.rmi.RemoteException
User host name.

Returns:
host name
Throws:
java.rmi.RemoteException

getUserObject

java.lang.Object getUserObject()
                               throws java.rmi.RemoteException
Returns user identifier object which was returned from AuthenticationHelper.authenticate(java.sql.Connection,String,String) (null in case of direct authentication).

Throws:
java.rmi.RemoteException

getActiveSessions

SessionInfo[] getActiveSessions()
                                throws java.rmi.RemoteException
Returns active sessions descriptors.

Throws:
java.rmi.RemoteException

killSession

void killSession(long sessionId)
                 throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getCurrentSession

SessionInfo getCurrentSession()
                              throws java.rmi.RemoteException
Returns calling session descriptor

Throws:
java.rmi.RemoteException

migrateTo

IDBInterface migrateTo(IConnectionFactory conf)
                       throws java.rmi.RemoteException,
                              java.sql.SQLException
Opens new DB connection to another application with same login and password.

Parameters:
conf - root object of application
Returns:
new DB connection
Throws:
java.rmi.RemoteException
java.sql.SQLException

runProcess

void runProcess(ProcessFactory factory)
                throws java.rmi.RemoteException,
                       java.sql.SQLException
Creates background process on the server.

Parameters:
factory - process factory
Throws:
java.rmi.RemoteException
java.sql.SQLException