|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.mobilitools.util.corba.NSbinder
MobiliTools $Name: $, $Id: NSbinder.java,v 1.1.1.1 2003/03/28 14:48:06 dillense Exp $
Tool for making automatic bindings in CORBA naming service. The input can be a property file, an XML file, or Java properties. Binding names must be given according to "id!kind/.../id!kind" format. A binding object may be given as a stringified IOR, as a file containing a stringified IOR, or as a URL containing a stringified IOR.
Constructor Summary | |
NSbinder()
Creates a new name service binder utility, using default/singleton ORB object. |
|
NSbinder(org.omg.CORBA.ORB orb)
Creates a new name service binder utility, using the provided ORB object. |
Method Summary | |
void |
bind(java.util.Properties props)
Performs CORBA name service bindings specified by the provided properties. |
void |
bindFromPropFile(java.lang.String file)
Parses the specified property file in order to make the specified bindings. |
void |
bindFromXMLFile(java.lang.String file)
Parses the specified XML file in order to make the specified bindings. |
static void |
main(java.lang.String[] args)
Parses a property file or an xml file describing a set of CORBA name service bindings to do. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NSbinder() throws NameServiceException
NameServiceException
- if no valid initial reference to a naming service
could be obtained.public NSbinder(org.omg.CORBA.ORB orb) throws NameServiceException
orb
- the ORB object to use.NameServiceException
- if no valid initial reference to a naming service
could be obtained.Method Detail |
public static void main(java.lang.String[] args)
args
- shall contain ORB-specific switches first, and
then either -xml xml_file
or -prop property_file
switch.bindFromXMLFile(String)
,
bindFromPropFile(String)
public void bindFromXMLFile(java.lang.String file) throws java.lang.Exception
<bind name="some_new_context" />
rebinds name to a new naming context
<bind name="some_object" ior="IOR:...." />
rebinds name to the specified IOR
<bind name="some_object" file="IOR_file" />
rebinds name to IOR contained in the specified file
<bind name="some_object" url="IOR_URL" />
rebinds name to IOR contained at the specified URL
file
- the name of the XML file to be parsed.java.lang.Exception
- a variety of exceptions if a parsing error occurs,
because of an invalid file format (check the XML content)public void bindFromPropFile(java.lang.String file) throws java.io.IOException
file
- the name of the property file to be parsed.java.io.IOException
- if the specified file could not be read.bind(Properties)
public void bind(java.util.Properties props)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |