org.tentackle.appworx.rmi
Class AppDbOperationRemoteDelegateImpl<T extends AppDbOperation>
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>
org.tentackle.appworx.rmi.AppDbOperationRemoteDelegateImpl<T>
- Type Parameters:
T - the AppDbOperation class
- All Implemented Interfaces:
- Serializable, Remote, AppDbOperationRemoteDelegate, DbOperationRemoteDelegate, RemoteDelegate
public abstract class AppDbOperationRemoteDelegateImpl<T extends AppDbOperation>
- extends DbOperationRemoteDelegateImpl<T>
- implements AppDbOperationRemoteDelegate
Implementation of the remote delegate for AppDbOperation.
Never instantiated.
- Author:
- harald
- See Also:
- Serialized Form
|
Method Summary |
protected T |
newObject(ContextDb cb)
Creates a new instance of the required class in the given context
for methods that return a new object. |
protected void |
setContextDb(ContextDb cb)
Sets the contextdb in the default object. |
protected void |
setup()
Instantiates a singe object and connect it to the database context. |
AppDbOperationRemoteDelegateImpl
public AppDbOperationRemoteDelegateImpl(RemoteDbSessionImpl session,
Class<T> clazz,
int port,
RMIClientSocketFactory csf,
RMIServerSocketFactory ssf)
throws RemoteException
- Creates delegate.
- Parameters:
session - the RMI sessionclazz - 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
AppDbOperationRemoteDelegateImpl
public AppDbOperationRemoteDelegateImpl(RemoteDbSessionImpl session,
Class<T> clazz)
throws RemoteException
- Creates a delegate on the session socket.
- Parameters:
session - the RMI sessionclazz - the subclass of DbObject
- Throws:
RemoteException
AppDbOperationRemoteDelegateImpl
public AppDbOperationRemoteDelegateImpl(RemoteDbSessionImpl session,
Class<T> clazz,
int socketConfig)
throws RemoteException
- Create a delegate on a non-default session socket.
- Parameters:
session - is the RMI sessionclazz - the subclass of DbObjectsocketConfig - is of RemoteDbSessionImpl.SOCKETCONFIG_...
- Throws:
RemoteException
setup
protected void setup()
throws RemoteException
- Instantiates a singe object and connect it to the database context.
The object is used for all methods not returning a new object and thus
minimizes object construction.
- Overrides:
setup in class DbOperationRemoteDelegateImpl<T extends AppDbOperation>
- Throws:
RemoteException
setContextDb
protected void setContextDb(ContextDb cb)
- Sets the contextdb in the default object.
- Parameters:
cb - the db context
newObject
protected T newObject(ContextDb cb)
throws RemoteException
- Creates a new instance of the required class in the given context
for methods that return a new object.
- Parameters:
cb - the db context
- Returns:
- the created object
- Throws:
RemoteException
Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de