org.openorb.CORBA.kernel
Interface ORBLoader

All Known Implementing Classes:
DefaultLoader, OpenORBLoader

public interface ORBLoader

This interface describes what are the operations to implement in order to provide an ORB loader.

Version:
$Revision: 1.11 $ $Date: 2002/07/15 14:53:41 $
Author:
Jerome Daniel

Method Summary
 java.lang.reflect.Constructor classConstructor(java.lang.String prop_key, java.lang.String defl, java.lang.Class[] args_t)
           
 java.lang.Object constructClass(java.lang.String prop_key, java.lang.String defl, java.lang.Object[] args)
          This operation is used to load a class with the given property name and default class name.
 java.lang.Object constructClass(java.lang.String prop_key, java.lang.String defl, java.lang.Object[] args, java.lang.Class[] args_t)
          This operation is used to load a class with the given property name and default class name.
 void display_configuration()
          This operation is used to display an OpenORB configuration.
 boolean getBooleanProperty(java.lang.String name)
          Get the boolean property with the given name.
 boolean getBooleanProperty(java.lang.String name, boolean defl)
          Get the boolean property with the given name.
 java.lang.Class getClassProperty(java.lang.String name)
          Get the integer property with the given name.
 java.lang.Class getClassProperty(java.lang.String name, java.lang.Class defl)
          Get the Class object property with the given name.
 java.lang.Class getClassProperty(java.lang.String name, java.lang.String defl)
          Get the Class object property with the given name.
 int getIntProperty(java.lang.String name)
          Get the integer property with the given name.
 int getIntProperty(java.lang.String name, int defl)
          Get the integer property with the given name.
 Property getProperty(java.lang.String name)
          Get the Property object with the given name.
 java.lang.String getStringProperty(java.lang.String name)
          Get the string property with the given name.
 java.lang.String getStringProperty(java.lang.String name, java.lang.String defl)
          Get the string property with the given name.
 java.net.URL getURLProperty(java.lang.String name)
          Get the URL property with the given name.
 java.net.URL getURLProperty(java.lang.String name, java.net.URL defl)
          Get the URL property with the given name.
 void init(java.lang.String[] args, java.util.Properties properties, ORB orb)
          This operation is called on the ORB to initialize it.
 java.util.Iterator properties(java.lang.String name)
          Iterate over property values with the specified prefix.
 

Method Detail

init

public void init(java.lang.String[] args,
                 java.util.Properties properties,
                 ORB orb)
This operation is called on the ORB to initialize it. This operation can be called only once.

display_configuration

public void display_configuration()
This operation is used to display an OpenORB configuration.

properties

public java.util.Iterator properties(java.lang.String name)
Iterate over property values with the specified prefix.

Parameters:
name - parent of properties. Properies of the form name + "." + xxx are returned, where xxx can be anything. May be null to iterate over all properies.
Returns:
unmodifiable iterator over the name's decendants. This iterator returns objects of type Property.

getProperty

public Property getProperty(java.lang.String name)
Get the Property object with the given name.
Parameters:
name - the property name.

getStringProperty

public java.lang.String getStringProperty(java.lang.String name,
                                          java.lang.String defl)
Get the string property with the given name.
Parameters:
name - the property name.
defl - default value to use if property not found.

getStringProperty

public java.lang.String getStringProperty(java.lang.String name)
                                   throws PropertyNotFoundException
Get the string property with the given name.
Parameters:
name - the property name.
Throws:
PropertyNotFoundException - the property cannot be found.

getIntProperty

public int getIntProperty(java.lang.String name,
                          int defl)
Get the integer property with the given name.
Parameters:
name - the property name.
defl - default value to use if property not found.
Throws:
INITIALIZE - The property value is not parsable to an int.

getIntProperty

public int getIntProperty(java.lang.String name)
                   throws PropertyNotFoundException
Get the integer property with the given name.
Parameters:
name - the property name.
Throws:
PropertyNotFoundException - the property cannot be found.
INITIALIZE - The property value is not parsable to an int.

getBooleanProperty

public boolean getBooleanProperty(java.lang.String name,
                                  boolean defl)
Get the boolean property with the given name.
Parameters:
name - the property name.
defl - default value to use if property not found.
Throws:
java.lang.ClassCastException - The property value is not parsable to a boolean.

getBooleanProperty

public boolean getBooleanProperty(java.lang.String name)
                           throws PropertyNotFoundException
Get the boolean property with the given name.
Parameters:
name - the property name.
Throws:
PropertyNotFoundException - the property cannot be found.
java.lang.ClassCastException - The property value is not parsable to a boolean.

getURLProperty

public java.net.URL getURLProperty(java.lang.String name,
                                   java.net.URL defl)
Get the URL property with the given name.
Parameters:
name - the property name.
defl - default value to use if property not found.
Throws:
java.lang.ClassCastException - The property value is not parsable to a URL.

getURLProperty

public java.net.URL getURLProperty(java.lang.String name)
                            throws PropertyNotFoundException
Get the URL property with the given name.
Parameters:
name - the property name.
Throws:
PropertyNotFoundException - the property cannot be found.
java.lang.ClassCastException - The property value is not parsable to a URL.

getClassProperty

public java.lang.Class getClassProperty(java.lang.String name,
                                        java.lang.Class defl)
Get the Class object property with the given name.
Parameters:
name - the property name.
defl - default value to use if property not found.
Throws:
INITIALIZE - the property value cannot be loaded as a class.

getClassProperty

public java.lang.Class getClassProperty(java.lang.String name,
                                        java.lang.String defl)
Get the Class object property with the given name.
Parameters:
name - the property name.
defl - String name of default value to use if property not found.
Throws:
INITIALIZE - the property value or default class cannot be loaded as a class.

getClassProperty

public java.lang.Class getClassProperty(java.lang.String name)
                                 throws PropertyNotFoundException
Get the integer property with the given name.
Parameters:
name - the property name.
Throws:
PropertyNotFoundException - the property cannot be found.
INITIALIZE - the property value cannot be loaded as a class.

constructClass

public java.lang.Object constructClass(java.lang.String prop_key,
                                       java.lang.String defl,
                                       java.lang.Object[] args)
                                throws java.lang.reflect.InvocationTargetException
This operation is used to load a class with the given property name and default class name.
Parameters:
prop_key - Property name, this string property holds the name of the class. May be null if no property is used.
defl - Default class name. Used if the named property is not found. May be null to indicate no load should be performed if property is missing.
args - arguments to constructor. If any constructor arguments are primitive types then the four argument version of this function must be used.
Returns:
the newly constructed object, or null if the property value is set to the empty string.
Throws:
java.lang.reflect.InvocationTargetException - an exception occoured in the constructor.
INITIALIZE - the property value or default class cannot be loaded as a class.
java.lang.IllegalArgumentException - some other problem occoured.

constructClass

public java.lang.Object constructClass(java.lang.String prop_key,
                                       java.lang.String defl,
                                       java.lang.Object[] args,
                                       java.lang.Class[] args_t)
                                throws java.lang.reflect.InvocationTargetException
This operation is used to load a class with the given property name and default class name.
Parameters:
prop_key - Property name, this string property holds the name of the class. May be null if no property is used.
defl - Default class name. Used if the named property is not found. May be null to indicate no load should be performed if property is missing.
args - arguments to constructor. If any constructor arguments are primitive types then the four argument version of this function must be used.
args_t - types of onstructor arguments. If any of these are null they will be determined from getClass on the matching arg. Length must match length of args.
Returns:
the newly constructed object, or null if the property value is set to the empty string.
Throws:
java.lang.reflect.InvocationTargetException - an exception occoured in the constructor.
INITIALIZE - the property value or default class cannot be loaded as a class.
java.lang.IllegalArgumentException - some other problem occoured.

classConstructor

public java.lang.reflect.Constructor classConstructor(java.lang.String prop_key,
                                                      java.lang.String defl,
                                                      java.lang.Class[] args_t)