dermi.registry
Class FileRegistry

java.lang.Object
  extended by dermi.registry.FileRegistry

public class FileRegistry
extends java.lang.Object

Utility class for stub and interceptor loading (they are loaded from a file)

Version:
1.2
Author:
Carles Pairot

Constructor Summary
FileRegistry()
           
 
Method Summary
static ERemote loadERef(java.util.Properties env)
          Returns a reference (stub) for the remote object associated with the specified information in the properties Object.
static ERemote loadERef(java.lang.String fileName)
          Returns a reference (stub) for the remote object associated with the specified file location.
static EInterceptor loadInterceptor(java.util.Properties p, java.lang.String intClass)
          Returns a reference to an Interceptor that intercepts object calls to remote object instantiated with properties p.
static ERemote loadStub(java.util.Properties env)
          Returns a reference (stub) for the remote object associated with the specified information in the properties object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileRegistry

public FileRegistry()
Method Detail

loadERef

public static ERemote loadERef(java.lang.String fileName)
                        throws RemoteException
Returns a reference (stub) for the remote object associated with the specified file location.

Parameters:
fileName - String Name of the properties file containing the object's location
Returns:
ERemote Reference to the remote object
Throws:
RemoteException - If the connection with the event service fails

loadERef

public static ERemote loadERef(java.util.Properties env)
                        throws RemoteException
Returns a reference (stub) for the remote object associated with the specified information in the properties Object.

Parameters:
env - Properties Containing object location
Returns:
ERemote Reference to the remote object
Throws:
RemoteException - If the connection with the event service fails

loadStub

public static ERemote loadStub(java.util.Properties env)
                        throws RemoteException
Returns a reference (stub) for the remote object associated with the specified information in the properties object. The stub is not initialized and it is not connected to the event bus. This method is internally used to pass remote objects by reference.

Parameters:
env - Properties Containing object location
Returns:
ERemote Reference to the remote object (stub not initialized)
Throws:
RemoteException - If the connection with the event service fails.

loadInterceptor

public static EInterceptor loadInterceptor(java.util.Properties p,
                                           java.lang.String intClass)
                                    throws RemoteException
Returns a reference to an Interceptor that intercepts object calls to remote object instantiated with properties p.

Parameters:
p - Properties Object's properties
intClass - String Name of the interceptor class
Returns:
EInterceptor Reference to the remote interceptor
Throws:
RemoteException - If the connection to the event service fails.