org.omg.CosNaming

Interface NamingContextExtOperations

public interface NamingContextExtOperations extends NamingContextOperations

This interface has been introduced for the Interoperable Name Service. This interface extends NamingContext and provides several new methods to manage CORBA URL.
Method Summary
Objectresolve_str(String n)
This is a convenience operation that performs a resolve in the same manner as NamingContext::resolve.
NameComponent[]to_name(String sn)
This operation accepts a stringified name and returns a Name.
Stringto_string(NameComponent[] n)
This operation accepts Name and returns a stringified name.
Stringto_url(String addr, String sn)
This operation takes an URL address and performs any escapes necessary on the stringified name and returns a fully formed URL string.

Method Detail

resolve_str

public Object resolve_str(String n)
This is a convenience operation that performs a resolve in the same manner as NamingContext::resolve. It accepts a stringified name as an argument instead of a Name.

Parameters: n the stringified name of the object (or naming context) to resolve

Returns: the resolved object.

Throws: NotFound Indicates the name does not identify a binding. CannotProceed Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context. InvalidName Indicates the name is invalid. (A name of length 0 is invalid; implementations may place other restrictions on names.)

to_name

public NameComponent[] to_name(String sn)
This operation accepts a stringified name and returns a Name.

Parameters: sn The stringified name to transform to a name.

Throws: InvalideName This exception is raised if the stringified name is syntactically malformed or violates an implementation limit.

to_string

public String to_string(NameComponent[] n)
This operation accepts Name and returns a stringified name.

Parameters: n the name to stringified.

Throws: InvalidName This exception is raised if the name is invalid.

to_url

public String to_url(String addr, String sn)
This operation takes an URL address and performs any escapes necessary on the stringified name and returns a fully formed URL string.

Parameters: addr The address ( for example myhost.xyz.com ) sn The stringified name to add to the URL

Returns: the URL string format.

Throws: InvalidAddress This exception is raises if a address is invalid ( it means that the address does not respect the address format ). InvalidName This exception is raised if the stringified name is syntactically malformed or violates an implementation limit.