|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.objectweb.david.libs.services.naming.NSRetriever
NSRetriever may be used to retrieve local instances of the 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 NameServer |
getNSDirectly(String host,
short port,
ORB orb)
Returns a local interface to the name server. |
static NameServer |
getNSFromFile(String file,
ORB orb)
Returns a local interface to the name server. |
static NameServer |
getNSFromURL(String url,
ORB orb)
Returns a local interface to the name server. |
Object |
newObject(Context _c)
Returns an object created using information contained in the provided context.
|
| 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 NameServer getNSFromFile(String file,
ORB orb)
throws JonathanException,
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.JonathanException - if the binding with the distant name server
failed.IOException - if an IO error occurred;
public static NameServer getNSFromURL(String url,
ORB orb)
throws JonathanException,
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.JonathanException - if the binding with the distant name server
failed.IOException - if an IO error occurred;
public static NameServer getNSDirectly(String host,
short port,
ORB orb)
throws 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.JonathanException - if the binding with the distant name server
failed.
public Object newObject(Context _c)
throws JonathanException
context.
The provided context must contain either a component of name
"/ORB", or a component of name "ORB", of type ORB.
It must also contain information about the method used to retrieve a reference to a name server (to be completed).
newObject in interface Factory_c - a Context object;context.JonathanException - if something goes wrong.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||