org.objectweb.carol.util.configuration
Class CarolConfiguration

java.lang.Object
  extended byorg.objectweb.carol.util.configuration.CarolConfiguration

public class CarolConfiguration
extends java.lang.Object

Interface CarolConfiguration for Carol environment You must have a communication.xml and communication.dtd in your classpath for the definition of this context


Field Summary
static java.lang.String CAROL_FILE_NAME
          rmi properties file name
static java.lang.String DEFAULTS_FILE_NAME
          carol defaults properties file name
static java.lang.String JNDI_FILE_NAME
          jndi properties file name
 
Constructor Summary
CarolConfiguration()
          Constructor Read the communication context
 
Method Summary
static void addInterceptors(java.lang.String protocolName, java.lang.String interceptorInitializer)
          Add interceptors facility for protocols
static boolean checkCarolConfiguration()
          public static boolean check communication configuration method
static java.util.Hashtable getAllRMIConfiguration()
          Get all RMI environment
static java.lang.String getCarolConfiguration()
          public static boolean check communication configuration method
static RMIConfiguration getDefaultProtocol()
          Get the default rmi
static java.lang.String getProtocols()
          public static String, get activated carol protocols
static RMIConfiguration getRMIConfiguration(java.lang.String name)
          Get a RMI environment with his architecture name
static void init()
          init the Carol configuration, A server can call this static method for instantiate the carol communication layer
static void init(org.objectweb.util.monolog.api.LoggerFactory lf)
          init the Carol configuration, A server can call this static method for instantiate the carol communication layer
static void loadCarolConfiguration()
          This method read all the the orbX.properties, jndiX.properties file for protocols configurations
static void loadCarolConfiguration(java.util.Properties allProps)
          This method read a carol configuration from a Properties object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULTS_FILE_NAME

public static final java.lang.String DEFAULTS_FILE_NAME
carol defaults properties file name

See Also:
Constant Field Values

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

CarolConfiguration

public CarolConfiguration()
                   throws RMIConfigurationException
Constructor Read the communication context

Method Detail

init

public static void init()
                 throws RMIConfigurationException
init the Carol configuration, A server can call this static method for instantiate the carol communication layer

Throws:
RMIConfigurationException

init

public static void init(org.objectweb.util.monolog.api.LoggerFactory lf)
                 throws RMIConfigurationException
init the Carol configuration, A server can call this static method for instantiate the carol communication layer

Throws:
RMIConfigurationException

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
Throws:
RMIConfigurationException

getAllRMIConfiguration

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

Returns:
Hashtable the rmi configuration hashtable
Throws:
RMIConfigurationException

getDefaultProtocol

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

Returns:
RMIConfiguration default RMI Configuration
Throws:
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 allProps)
                                   throws RMIConfigurationException
This method read a carol configuration from a Properties object

Throws:
RMIConfigurationException - if a there is a problem with those environment (field missing for example)

checkCarolConfiguration

public static boolean checkCarolConfiguration()
public static boolean check communication configuration method

Returns:
boolean true if the configuration seam to be ok

getCarolConfiguration

public static java.lang.String getCarolConfiguration()
public static boolean check communication configuration method

Returns:
boolean true if the configuration seam to be ok

getProtocols

public static java.lang.String getProtocols()
public static String, get activated carol protocols

Returns:
String activated protocols

addInterceptors

public static void addInterceptors(java.lang.String protocolName,
                                   java.lang.String interceptorInitializer)
                            throws RMIConfigurationException
Add interceptors facility for protocols

Throws:
RMIConfigurationException