|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openorb.CORBA.kernel.OpenORBLoader
This class gets information from the command line to load OpenORB features. This class also provides several methods to access some information about configuration. For example, it is possible to call 'getBooleanProperty' to get a boolean value that corresponds to an OpenORB property ( stored into a profile ).
Constructor Summary | |
OpenORBLoader()
Constructor |
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. |
void |
display_configuration(org.apache.avalon.framework.logger.Logger logger)
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)
ORB Initialization. |
java.util.Iterator |
properties(java.lang.String name)
Iterate over property values with the specified prefix. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OpenORBLoader()
Method Detail |
public void init(java.lang.String[] args, java.util.Properties properties, ORB orb)
init
in interface ORBLoader
public void display_configuration()
display_configuration
in interface ORBLoader
public void display_configuration(org.apache.avalon.framework.logger.Logger logger)
public java.util.Iterator properties(java.lang.String name)
properties
in interface ORBLoader
name
- parent of properties. Properies of the form name + "." +
are returned, where can be anything. May be null to iterate over all
properies.public Property getProperty(java.lang.String name)
getProperty
in interface ORBLoader
name
- the property name.public java.lang.String getStringProperty(java.lang.String name, java.lang.String defl)
getStringProperty
in interface ORBLoader
name
- the property name.defl
- default value to use if property not found.public java.lang.String getStringProperty(java.lang.String name) throws PropertyNotFoundException
getStringProperty
in interface ORBLoader
name
- the property name.PropertyNotFoundException
- the property cannot be found.public int getIntProperty(java.lang.String name, int defl)
getIntProperty
in interface ORBLoader
name
- the property name.defl
- default value to use if property not found.INITIALIZE
- The property value is not parsable to an int.public int getIntProperty(java.lang.String name) throws PropertyNotFoundException
getIntProperty
in interface ORBLoader
name
- the property name.PropertyNotFoundException
- the property cannot be found.INITIALIZE
- The property value is not parsable to an int.public boolean getBooleanProperty(java.lang.String name, boolean defl)
getBooleanProperty
in interface ORBLoader
name
- the property name.defl
- default value to use if property not found.public boolean getBooleanProperty(java.lang.String name) throws PropertyNotFoundException
getBooleanProperty
in interface ORBLoader
name
- the property name.PropertyNotFoundException
- the property cannot be found.public java.net.URL getURLProperty(java.lang.String name, java.net.URL defl)
getURLProperty
in interface ORBLoader
name
- the property name.defl
- default value to use if property not found.java.lang.ClassCastException
- The property value is not parsable to a URL.public java.net.URL getURLProperty(java.lang.String name) throws PropertyNotFoundException
getURLProperty
in interface ORBLoader
name
- the property name.PropertyNotFoundException
- the property cannot be found.java.lang.ClassCastException
- The property value is not parsable to a URL.public java.lang.Class getClassProperty(java.lang.String name, java.lang.Class defl)
getClassProperty
in interface ORBLoader
name
- the property name.defl
- default value to use if property not found.INITIALIZE
- the property value cannot be loaded as a class.public java.lang.Class getClassProperty(java.lang.String name, java.lang.String defl)
getClassProperty
in interface ORBLoader
name
- the property name.defl
- String name of default value to use if property not found.INITIALIZE
- the property value or default class cannot
be loaded as a class.public java.lang.Class getClassProperty(java.lang.String name) throws PropertyNotFoundException
getClassProperty
in interface ORBLoader
name
- the property name.PropertyNotFoundException
- the property cannot be found.INITIALIZE
- the property value cannot be loaded as a class.public java.lang.Object constructClass(java.lang.String prop_key, java.lang.String defl, java.lang.Object[] args) throws java.lang.reflect.InvocationTargetException
constructClass
in interface ORBLoader
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.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.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
constructClass
in interface ORBLoader
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.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.public java.lang.reflect.Constructor classConstructor(java.lang.String prop_key, java.lang.String defl, java.lang.Class[] args_t)
classConstructor
in interface ORBLoader
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |