GERODOLLE Anne FTRD/DTL wrote: > > I think you may also avoid the use of IOR file by specifying the port > where the CosNaming server is to run > (-port xxx) > > and using the following properties : > david.CosNaming.default_method=0 > david.CosNaming.default_host=hostname > david.CosNaming.default_port=xxxx Right. I've just found information about that in Jonathan documentation (see init() method in class org.objectweb.david.libs.services.CosNaming.NSRetriever). Now the question is: is there a method somewhere in David to build an IOR from a host IP address/name and a port number? (that would help me automatically federate several CosNamings). -- Bruno.Title: Jonathan 2.0 Documentation: Class NSRetriever
org.objectweb.david.libs.services.CosNaming
| |||||||||||||||||||||||||||||||||||||||||||
| Method Summary | |
static NamingContext |
getNSDirectly(String host,
short port,
ORB orb)
Returns a local interface to the name server. |
static NamingContext |
getNSFromFile(String file,
ORB orb)
Returns a local interface to the name server. |
static NamingContext |
getNSFromURL(String url,
ORB orb)
Returns a local interface to the name server. |
static NamingContext |
init(Kernel kernel)
Returns a local interface for the name server. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Method Detail |
init
public static NamingContext init(Kernel kernel) throws JonathanException
- Returns a local interface for the name server.
The local interface is obtained using {#link Kernel#getProperties() kernel properties}. The property named "david.CosNaming.default_method" indicates the method used to build the local naming service proxy. Its value should be an integer between 0 and 2.
If its value is 0, the proxy will be obtained by calling the
getNSDirectlymethod.- the host name used must be specified by the "david.CosNaming.default_host" property;
- the port number, if its value is different from the default (14727), must be specified by the "david.CosNaming.default_port" property.
getNSFromURLmethod.- the url used must be specified by the "david.CosNaming.default_url" property;
getNSFromFilemethod.- the file used must be specified by the "david.CosNaming.default_file" property;
kernel serviceof name "david.CosNaming.orb".- Parameters:
kernel- a Kernel instance.- Returns:
- a naming service instance.
- Throws:
- JonathanException - if something goes wrong.
getNSFromFile
public static NamingContext getNSFromFile(String file, ORB orb) throws JonathanException, IOException
- Returns a local interface to the name server.
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.
- Parameters:
file- the file name;orb- an ORB instance.- Returns:
- a local interface to the name server.
- Throws:
- JonathanException - if the binding with the distant name server
failed.
- IOException - if an IO error occurred;
getNSFromURL
public static NamingContext getNSFromURL(String url, ORB orb) throws JonathanException, IOException
- Returns a local interface to the name server.
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.
- Parameters:
url- the name of the url corresponding to a file containing an IOR;orb- an ORB instance.- Returns:
- a local interface to the name server.
- Throws:
- JonathanException - if the binding with the distant name server
failed.
- IOException - if an IO error occurred;
getNSDirectly
public static NamingContext getNSDirectly(String host, short port, ORB orb) throws JonathanException
- Returns a local interface to the name server.
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.
- Parameters:
host- a hostname;port- a port number;orb- an ORB instance.- Returns:
- a local interface to the name server.
- Throws:
- JonathanException - if the binding with the distant name server failed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
