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 String
This 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 String
cleanEscapeCharacter
(String theString) This method cleans the escapes in the Stringified name and returns the correct Stringprivate boolean
private String
convertNameComponentToString
(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 NameComponent
createNameComponentFromString
(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 String
Encodes the string according to RFC 2396 IETF spec required by INS.private boolean
private 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
This method adds escape '\' for the Namecomponent if neccessary -
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
Step1 in converting Stringified name into array of Name Component is breaking the String into multiple name components -
StringComponentsFromIndices
private 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. -
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
This method cleans the escapes in the Stringified name and returns the correct String -
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
Encodes the string according to RFC 2396 IETF spec required by INS.
-