org.tentackle.db.rmi
Interface RemoteDbSession

All Superinterfaces:
Remote
All Known Subinterfaces:
AppRemoteDbSession
All Known Implementing Classes:
AppRemoteDbSessionImpl, RemoteDbSessionImpl

public interface RemoteDbSession
extends Remote

Application server session.
The session will create all other delegates for the client.

Author:
harald

Method Summary
 void close()
          Closes a session.
 DbRemoteDelegate getDbRemoteDelegate()
          Gets the delegate for the remote db-connection.
 RemoteDelegate getRemoteDelegate(String classname, int delegateId)
          Gets the delegate for a given classname.
Per class the rmi-clients request a remote access there must be a RemoteDelegate.
 void log(Logger.Level level, String message)
          Sends text based logging infos to the RMI-Server.
 

Method Detail

close

void close()
           throws RemoteException
Closes a session.

Throws:
RemoteException

log

void log(Logger.Level level,
         String message)
         throws RemoteException
Sends text based logging infos to the RMI-Server.

Parameters:
level -
message -
Throws:
RemoteException

getDbRemoteDelegate

DbRemoteDelegate getDbRemoteDelegate()
                                     throws RemoteException
Gets the delegate for the remote db-connection.

Returns:
the delegate
Throws:
RemoteException

getRemoteDelegate

RemoteDelegate getRemoteDelegate(String classname,
                                 int delegateId)
                                 throws RemoteException
Gets the delegate for a given classname.
Per class the rmi-clients request a remote access there must be a RemoteDelegate. The delegate is determined from the classname of the client class as follows:
<package>.rmi.<last-element-of-classname>.class on the client-side and
<package>.rmi.<last-element-of-classname>Impl.class on the server-side.
The delegates are cached on the client side in order to speed up access. Delegates are bound to a session, i.e. there will be one delegate for each session and class.

Parameters:
classname - is the name of class
delegateId - is the client-side ID of the delegate
Returns:
the delegate
Throws:
RemoteException


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de