VisiBroker for Java

com.inprise.vbroker.naming
Class NamingUtil

java.lang.Object
  extended by com.inprise.vbroker.naming.NamingUtil

public class NamingUtil
extends java.lang.Object

This class provides static methods that do stringified name to CosNaming name and vice versa transformation, without going over the wire as NamingContextExt does.


Constructor Summary
NamingUtil()
           
 
Method Summary
static NameComponent[] to_name(java.lang.String sn)
          This operation accepts a stringified name and returns a Name.
static java.lang.String to_string(NameComponent[] n)
          The to_string() method converts a NameComponent array to a stringified name.
static java.lang.String to_url(java.lang.String addr, java.lang.String sn)
          This operation takes a corbaloc URL <address> and <key_string> component such as :myhost.555xyz.com :myhost.555xyz.com/a/b/c atm:00002112...,:myhost.xyz.com/a/b/c for the first parameter, and a stringified name for the second.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamingUtil

public NamingUtil()
Method Detail

to_string

public static java.lang.String to_string(NameComponent[] n)
                                  throws InvalidName
The to_string() method converts a NameComponent array to a stringified name.

Parameters:
n - the NameComponent array
Throws:
InvalidName

to_name

public static NameComponent[] to_name(java.lang.String sn)
                               throws InvalidName
This operation accepts a stringified name and returns a Name. If the stringified name is syntactically malformed or violates an implementation limit, an InvalidName exception is raised. The to_name() method converts a stringified name to a NameComponent array.

Parameters:
sn - the stringified representation
Throws:
InvalidName - if the stringified name is syntactically malformed or violates an implementation limit.

to_url

public static java.lang.String to_url(java.lang.String addr,
                                      java.lang.String sn)
                               throws InvalidName,
                                      InvalidAddress
This operation takes a corbaloc URL <address> and <key_string> component such as for the first parameter, and a stringified name for the second. It then performs any escapes necessary on the parameters and returns a fully formed URL string. An exception is raised if either the corbaloc address and key parameter or name parameter are malformed. It is legal for the stringified_name to be empty. If the address is empty, an InvalidAddress exception is raised.

Parameters:
addr - A corbaloc URL component
sn - A stringified name
Throws:
InvalidName
org.omg.CosNaming.NamingContextPackage.InvalidAddress
InvalidAddress

Borland Software Corporation
http://www.borland.com
100 Enterprise Way
Scotts Valley, CA 95066
Voice: (831) 431-1000
pubsweb@borland.com

Read the latest documentation online