|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.david.libs.services.CosNaming.NSRetriever
NSRetriever may be used to retrieve local instances of the COS naming
service. It is independent of its actual implementation.
Its newObject
method returns an instance of the naming
service, obtained thanks to defaults set in the provided context.
Constructor Summary | |
NSRetriever()
Buids a new Naming Service factory. |
Method Summary | |
static org.omg.CosNaming.NamingContext |
getNS(int method,
java.lang.String host,
int port,
java.lang.String url,
java.lang.String file,
org.omg.CORBA.ORB orb)
Returns a name server according to the method parameter. |
static org.omg.CosNaming.NamingContext |
getNSDirectly(java.lang.String host,
short port,
org.omg.CORBA.ORB orb)
Returns a local interface to the name server. |
static org.omg.CosNaming.NamingContext |
getNSFromFile(java.lang.String file,
org.omg.CORBA.ORB orb)
Returns a local interface to the name server. |
static org.omg.CosNaming.NamingContext |
getNSFromURL(java.lang.String url,
org.omg.CORBA.ORB orb)
Returns a local interface to the name server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NSRetriever()
Method Detail |
public static org.omg.CosNaming.NamingContext getNSFromFile(java.lang.String file, org.omg.CORBA.ORB orb) throws org.objectweb.jonathan.apis.kernel.JonathanException, java.io.IOException
This method tries to read the IOR of a name server from the specified file, and to build a local surrogate for the name server.
file
- the file name;orb
- an ORB instance.
org.objectweb.jonathan.apis.kernel.JonathanException
- if the binding with the distant name server
failed.
java.io.IOException
- if an IO error occurred;public static org.omg.CosNaming.NamingContext getNSFromURL(java.lang.String url, org.omg.CORBA.ORB orb) throws org.objectweb.jonathan.apis.kernel.JonathanException, java.io.IOException
This method tries to read the IOR of a name server from the specified url, and to build a local surrogate for the name server.
url
- the name of the url corresponding to a file containing an IOR;orb
- an ORB instance.
org.objectweb.jonathan.apis.kernel.JonathanException
- if the binding with the distant name server
failed.
java.io.IOException
- if an IO error occurred;public static org.omg.CosNaming.NamingContext getNSDirectly(java.lang.String host, short port, org.omg.CORBA.ORB orb) throws org.objectweb.jonathan.apis.kernel.JonathanException
This method tries to forge the IOR of a name server thanks to the specified host and port, and to build a local surrogate for the name server.
host
- a hostname;port
- a port number;orb
- an ORB instance.
org.objectweb.jonathan.apis.kernel.JonathanException
- if the binding with the distant name server
failed.public static org.omg.CosNaming.NamingContext getNS(int method, java.lang.String host, int port, java.lang.String url, java.lang.String file, org.omg.CORBA.ORB orb) throws org.objectweb.jonathan.apis.kernel.JonathanException
method
- host
- port
- url
- file
- orb
-
org.objectweb.jonathan.apis.kernel.JonathanException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |