org.objectweb.carol.util.configuration
Class CommunicationConfiguration

java.lang.Object
  |
  +--org.objectweb.carol.util.configuration.CommunicationConfiguration

public class CommunicationConfiguration
extends java.lang.Object


Field Summary
static java.lang.String CAROL_FILE_NAME
          rmi properties file name
static java.lang.String JNDI_FILE_NAME
          jndi properties file name
 
Constructor Summary
CommunicationConfiguration()
          Constructor Read the communication context
 
Method Summary
static void activateRMI(java.lang.String rmiName)
          This method activate a rmi architecture with is name.
static void desactivateRMI(java.lang.String rmiName)
          This method desactivate a rmi architecture with is name.
static java.util.Hashtable getAllRMIConfiguration()
          Get all RMI environment
static java.lang.String getConfigurationString()
          public static toString method
static RMIConfiguration getDefaultProtocol()
          Get the default rmi
static RMIConfiguration getRMIConfiguration(java.lang.String name)
          Get a RMI environment with his architecture name
static void loadCarolConfiguration()
          This method read all the the orbX.properties, jndiX.properties file for protocols configurations
static void loadCarolConfiguration(java.util.Properties rmiProps, java.util.Properties jndiProps)
          This method read a rmi configuration from 2 Properties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CAROL_FILE_NAME

public static final java.lang.String CAROL_FILE_NAME
rmi properties file name

See Also:
Constant Field Values

JNDI_FILE_NAME

public static final java.lang.String JNDI_FILE_NAME
jndi properties file name

See Also:
Constant Field Values
Constructor Detail

CommunicationConfiguration

public CommunicationConfiguration()
                           throws RMIConfigurationException
Constructor Read the communication context

Method Detail

getRMIConfiguration

public static RMIConfiguration getRMIConfiguration(java.lang.String name)
                                            throws RMIConfigurationException
Get a RMI environment with his architecture name

Returns:
RMIConfiguration the environment, null if not existe
RMIConfigurationException

getAllRMIConfiguration

public static java.util.Hashtable getAllRMIConfiguration()
                                                  throws RMIConfigurationException
Get all RMI environment

Returns:
Hashtable the rmi configuration hashtable
RMIConfigurationException

getDefaultProtocol

public static RMIConfiguration getDefaultProtocol()
                                           throws RMIConfigurationException
Get the default rmi

Returns:
RMIConfiguration default RMI Configuration
RMIConfigurationException

loadCarolConfiguration

public static void loadCarolConfiguration()
                                   throws RMIConfigurationException
This method read all the the orbX.properties, jndiX.properties file for protocols configurations

Throws:
RMIConfigurationException - if a problem occurs in the configuration loading

loadCarolConfiguration

public static void loadCarolConfiguration(java.util.Properties rmiProps,
                                          java.util.Properties jndiProps)
                                   throws RMIConfigurationException
This method read a rmi configuration from 2 Properties

Parameters:
rmiProps - The orbX environment (can be null)
jndiProps - The jndiX environment (can be null)
Throws:
RMIConfigurationException - if a there is a problem with those environment (field missing for example)

activateRMI

public static void activateRMI(java.lang.String rmiName)
                        throws RMIConfigurationException
This method activate a rmi architecture with is name. You need to load the CAROL configuration before using thid method.

Throws:
RMIConfigurationException - if a the carol configuration is not loaded (by the loadCarolConfiguration method)
RMIConfigurationException - if the rmi name doesn't exist in the carol configuration

desactivateRMI

public static void desactivateRMI(java.lang.String rmiName)
                           throws RMIConfigurationException
This method desactivate a rmi architecture with is name. You need to load the CAROL configuration before using thid method.

Throws:
RMIConfigurationException - if a the carol configuration is not loaded (by the loadCarolConfiguration method)
RMIConfigurationException - if the rmi name doesn't exist in the carol configuration

getConfigurationString

public static java.lang.String getConfigurationString()
public static toString method