Class InterOperableNamingImpl
java.lang.Object
com.sun.corba.ee.impl.naming.cosnaming.InterOperableNamingImpl
Class InteroperableNamingImpl implements the methods defined
for NamingContextExt which is part of Interoperable Naming
Service specifications. This class is added for doing more
of Parsing and Building of Stringified names according to INS
Spec.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringThis method adds escape '\' for the Namecomponent if neccessaryprivate String[]Step1 in converting Stringified name into array of Name Component is breaking the String into multiple name componentsprivate StringcleanEscapeCharacter(String theString) This method cleans the escapes in the Stringified name and returns the correct Stringprivate booleanprivate StringconvertNameComponentToString(NameComponent theNameComponent) This method converts a single Namecomponent to String, By adding Escapes If neccessary.convertToNameComponent(String theStringifiedName) Method which converts the Stringified name into Array of Name Components.convertToString(NameComponent[] theNameComponents) Method which stringifies the Name Components given as the input parameter.private NameComponentcreateNameComponentFromString(String theStringifiedNameComponent) Step 2: After Breaking the Stringified name into set of NameComponent Strings, The next step is to create Namecomponents from the substring by removing the escapes if there are any.createURLBasedAddress(String address, String name) Method which converts the Stringified name and Host Name Address into a URL based Nameprivate StringEncodes the string according to RFC 2396 IETF spec required by INS.private booleanprivate String[]StringComponentsFromIndices(int[] theIndices, int indicesCount, String theStringifiedName) This method breaks one big String into multiple substrings based on the array of index passed in.
-
Constructor Details
-
InterOperableNamingImpl
public InterOperableNamingImpl()
-
-
Method Details
-
convertToString
Method which stringifies the Name Components given as the input parameter.- Parameters:
theNameComponents- Array of Name Components (Simple or Compound Names)- Returns:
- string which is the stringified reference.
-
isEmpty
-
contains
-
convertNameComponentToString
This method converts a single Namecomponent to String, By adding Escapes If neccessary. -
addEscape
-
convertToNameComponent
Method which converts the Stringified name into Array of Name Components.- Parameters:
theStringifiedName- which is the stringified name.- Returns:
- Array of Name Components (Simple or Compound Names)
- Throws:
InvalidName- if the stringified name is invalid
-
breakStringToNameComponents
-
StringComponentsFromIndices
-
createNameComponentFromString
private NameComponent createNameComponentFromString(String theStringifiedNameComponent) throws InvalidName Step 2: After Breaking the Stringified name into set of NameComponent Strings, The next step is to create Namecomponents from the substring by removing the escapes if there are any.- Throws:
InvalidName
-
cleanEscapeCharacter
-
createURLBasedAddress
Method which converts the Stringified name and Host Name Address into a URL based Name- Parameters:
address- which is ip based host namename- which is the stringified name.- Returns:
- url based Name.
- Throws:
InvalidAddress- if the address is invalid
-
encode
-