org.tentackle.db.rmi
Class DbOperationRemoteDelegateImpl<T extends DbOperation>
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.tentackle.db.rmi.RemoteDelegateImpl<T>
org.tentackle.db.rmi.DbOperationRemoteDelegateImpl<T>
- Type Parameters:
T - the database operation class
- All Implemented Interfaces:
- Serializable, Remote, DbOperationRemoteDelegate, RemoteDelegate
- Direct Known Subclasses:
- AppDbOperationRemoteDelegateImpl
public abstract class DbOperationRemoteDelegateImpl<T extends DbOperation>
- extends RemoteDelegateImpl<T>
- implements DbOperationRemoteDelegate
Base class for the remote delegate of DbOperation.
All other subclasses of DbOperation should extend DbOperationRemoteDelegateImpl to reflect
the class hierarchy below DbOperation.
- Author:
- harald
- See Also:
- Serialized Form
|
Method Summary |
protected T |
newObject()
Creates a new instance of the required class
for methods that return a new object. |
protected void |
setup()
Instantiates a singe object and connect it to the db. |
dbObject
protected T extends DbOperation dbObject
DbOperationRemoteDelegateImpl
public DbOperationRemoteDelegateImpl(RemoteDbSessionImpl session,
Class<T> clazz,
int port,
RMIClientSocketFactory csf,
RMIServerSocketFactory ssf)
throws RemoteException
- Creates delegate.
- Parameters:
session - is the RMI sessionclazz - is the class the delegate provides service forport - the port number on which the remote object receives calls,
0 = system defaultcsf - the client-side socket factory for making calls to the
remote object, null = system defaultssf - the server-side socket factory for receiving remote calls,
null = system default
- Throws:
RemoteException
DbOperationRemoteDelegateImpl
public DbOperationRemoteDelegateImpl(RemoteDbSessionImpl session,
Class<T> clazz)
throws RemoteException
- Creates a delegate on the session socket.
- Parameters:
session - is the RMI sessionclazz - is the subclass of DbOperation
- Throws:
RemoteException
DbOperationRemoteDelegateImpl
public DbOperationRemoteDelegateImpl(RemoteDbSessionImpl session,
Class<T> clazz,
int socketConfig)
throws RemoteException
- Creates a delegate on a non-default session socket.
- Parameters:
session - is the RMI sessionclazz - is the subclass of DbOperationsocketConfig - is of RemoteDbSessionImpl.SOCKETCONFIG_...
- Throws:
RemoteException
setup
protected void setup()
throws RemoteException
- Instantiates a singe object and connect it to the db. (if class is not abstract).
The object is used for all methods not returning a new object and thus
minimizes object construction.
- Throws:
RemoteException
newObject
protected T newObject()
throws RemoteException
- Creates a new instance of the required class
for methods that return a new object.
- Returns:
- the new object
- Throws:
RemoteException
Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de