org.ow2.petals.se.rmi.registry
Class Registry

java.lang.Object
  extended by org.ow2.petals.se.rmi.registry.Registry

public class Registry
extends java.lang.Object

A class to simplify the RMI register creation.

Author:
Nicolas Salatge

Constructor Summary
Registry(RmiProperties properties)
          Creates a new instance of Registry.
 
Method Summary
 void deregisterRMIInterface()
          Method deregisterRMIInterface.
 java.lang.String getRegistryHost()
           
 int getRegistryPortNumber()
          Get the registry port number.
 java.lang.String getRmiComponentContextName()
          Get the RMI component context name.
 void initializeRegistry()
          Initialize the registry.
 boolean isRegistryEmbedded()
           
 void registerRMIInterface(org.objectweb.petals.tools.rmi.server.remote.interfaces.RemoteComponentContext comp)
          Method registerRMIInterface.
 void setCreateRegistry(boolean create)
          Set createRegistry value.
 void setRegistryHost(java.lang.String registryHost)
           
 void setRegistryPortNumber(int v)
          Set the registry port number.
 void setRmiComponentContextName(java.lang.String n)
           
 void shutDown(org.objectweb.petals.tools.rmi.server.remote.interfaces.RemoteComponentContext comp)
          Allow to shutdown RMI registry and unexport all linked remote objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Registry

public Registry(RmiProperties properties)
Creates a new instance of Registry.

Parameters:
properties - the RMI properties
Method Detail

getRegistryPortNumber

public int getRegistryPortNumber()
Get the registry port number.

Returns:
the port

setRegistryPortNumber

public void setRegistryPortNumber(int v)
Set the registry port number.

Parameters:
v - the port

getRegistryHost

public java.lang.String getRegistryHost()

setRegistryHost

public void setRegistryHost(java.lang.String registryHost)

isRegistryEmbedded

public boolean isRegistryEmbedded()
Returns:
true if the server registry is embedded to the component

setCreateRegistry

public void setCreateRegistry(boolean create)
Set createRegistry value.

Parameters:
v - the ShouldCreateRegistry

getRmiComponentContextName

public java.lang.String getRmiComponentContextName()
Get the RMI component context name.

Returns:
the RMI component context name

setRmiComponentContextName

public void setRmiComponentContextName(java.lang.String n)
Parameters:
n - the name of component context name

initializeRegistry

public void initializeRegistry()
                        throws java.rmi.RemoteException
Initialize the registry. If the registry already exists, get the references on it, else launch it...

Throws:
java.rmi.RemoteException - Impossible to realize a remote access

registerRMIInterface

public void registerRMIInterface(org.objectweb.petals.tools.rmi.server.remote.interfaces.RemoteComponentContext comp)
                          throws java.rmi.RemoteException,
                                 java.net.MalformedURLException,
                                 java.rmi.AlreadyBoundException
Method registerRMIInterface.

Parameters:
comp - the component context
Throws:
java.rmi.RemoteException - impossible to register this object
java.net.MalformedURLException - impossible to register this object
java.rmi.AlreadyBoundException - impossible to register this object

deregisterRMIInterface

public void deregisterRMIInterface()
                            throws java.rmi.RemoteException,
                                   java.net.MalformedURLException,
                                   java.rmi.NotBoundException
Method deregisterRMIInterface.

Throws:
java.rmi.RemoteException
java.rmi.RemoteException - impossible to register this object
java.net.MalformedURLException - impossible to register this object
java.rmi.NotBoundException - impossible to register this object

shutDown

public void shutDown(org.objectweb.petals.tools.rmi.server.remote.interfaces.RemoteComponentContext comp)
              throws java.rmi.AccessException,
                     java.rmi.RemoteException,
                     java.rmi.NotBoundException
Allow to shutdown RMI registry and unexport all linked remote objects.

Parameters:
comp - the component context
Throws:
java.rmi.AccessException
java.rmi.RemoteException
java.rmi.NotBoundException


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.