org.objectweb.carol.util.configuration

Class 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 String
CAROL_FILE_NAME
rmi properties file name
static String
DEFAULTS_FILE_NAME
carol defaults properties file name
static String
JNDI_FILE_NAME
jndi properties file name

Constructor Summary

CarolConfiguration()
Constructor Read the communication context

Method Summary

static void
addInterceptors(String protocolName, String interceptorInitializer)
Add interceptors facility for protocols
static boolean
checkCarolConfiguration()
public static boolean check communication configuration method
static Hashtable
getAllRMIConfiguration()
Get all RMI environment
static String
getCarolConfiguration()
public static boolean check communication configuration method
static RMIConfiguration
getDefaultProtocol()
Get the default rmi
static String
getProtocols()
public static String, get activated carol protocols
static RMIConfiguration
getRMIConfiguration(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(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(Properties allProps)
This method read a carol configuration from a Properties object

Field Details

CAROL_FILE_NAME

public static final String CAROL_FILE_NAME
rmi properties file name


DEFAULTS_FILE_NAME

public static final String DEFAULTS_FILE_NAME
carol defaults properties file name


JNDI_FILE_NAME

public static final String JNDI_FILE_NAME
jndi properties file name

Constructor Details

CarolConfiguration

public CarolConfiguration()
            throws RMIConfigurationException
Constructor Read the communication context

Method Details

addInterceptors

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

Parameters:


checkCarolConfiguration

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

Parameters:

Returns:
boolean true if the configuration seam to be ok


getAllRMIConfiguration

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

Returns:
Hashtable the rmi configuration hashtable


getCarolConfiguration

public static String getCarolConfiguration()
public static boolean check communication configuration method

Returns:
boolean true if the configuration seam to be ok


getDefaultProtocol

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

Returns:
RMIConfiguration default RMI Configuration


getProtocols

public static String getProtocols()
public static String, get activated carol protocols

Returns:
String activated protocols


getRMIConfiguration

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

Returns:
RMIConfiguration the environment, null if not existe


init

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


init

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


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(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)