org.jacorb.orb
Class ParsedIOR

java.lang.Object
  extended by org.jacorb.orb.ParsedIOR

public class ParsedIOR
extends java.lang.Object

Class to convert IOR strings into IOR structures

Version:
$Id: ParsedIOR.java,v 1.80 2006/08/03 16:40:12 alphonse.bendt Exp $
Author:
Gerald Brose

Field Summary
protected  boolean endianness
           
 
Constructor Summary
ParsedIOR(ORB orb, org.omg.IOP.IOR ior)
          Creates a new ParsedIOR instance.
ParsedIOR(ORB orb, java.lang.String object_reference)
          Creates a new ParsedIOR instance.
 
Method Summary
static org.omg.IOP.IOR createObjectIOR(org.omg.ETF.Profile profile)
          factory method
 void decode(org.omg.IOP.IOR _ior)
          When multiple internet IOP tags are present, they will probably have different versions, we will use the highest version between 0 and 1.
 boolean equals(java.lang.Object other)
          equals contract is that they have the same IOR string and the same effective profile.
static byte[] extractObjectKey(TargetAddress addr, ORB orb)
          This method replaces the unfiyTargetAddress method.
 byte[] get_object_key()
           
 java.lang.String getCodebaseComponent()
          Returns the value of the TAG_JAVA_CODEBASE component from this IOR, or null if no such component exists.
 CodeSetComponentInfo getCodeSetComponentInfo()
           
 Profile getEffectiveProfile()
           
 java.lang.String getIDString()
           
 org.omg.IOP.IOR getIOR()
           
 java.lang.String getIORString()
           
 TaggedComponentList getMultipleComponents()
           
 java.lang.Integer getORBTypeId()
           
 java.util.List getProfiles()
           
 java.lang.String getTypeId()
           
 int hashCode()
           
 boolean isNull()
           
static boolean isParsableProtocol(java.lang.String check)
          isParsableProtocol returns true if ParsedIOR can handle the protocol within the string.
protected  void parse(java.lang.String object_reference)
          parse decodes the object_reference passed to ParsedIOR.
 void setProfileSelector(ProfileSelector sel)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

endianness

protected boolean endianness
Constructor Detail

ParsedIOR

public ParsedIOR(ORB orb,
                 java.lang.String object_reference)
          throws java.lang.IllegalArgumentException
Creates a new ParsedIOR instance.

Parameters:
orb - an org.jacorb.orb.ORB value
object_reference - a String value
Throws:
java.lang.IllegalArgumentException

ParsedIOR

public ParsedIOR(ORB orb,
                 org.omg.IOP.IOR ior)
Creates a new ParsedIOR instance.

Parameters:
orb - an org.jacorb.orb.ORB value
ior - an IOR value
Method Detail

createObjectIOR

public static org.omg.IOP.IOR createObjectIOR(org.omg.ETF.Profile profile)
factory method


extractObjectKey

public static byte[] extractObjectKey(TargetAddress addr,
                                      ORB orb)
This method replaces the unfiyTargetAddress method.

It will extract an object key from any given GIOP::TargetAddress assuming an appropriate ETF::Factories implementation is availble for the profile in use.


getCodebaseComponent

public java.lang.String getCodebaseComponent()
Returns the value of the TAG_JAVA_CODEBASE component from this IOR, or null if no such component exists. The component is first searched in the effective profile, if that is an IIOPProfile, and failing that, in the MULTIPLE_COMPONENTS list.


equals

public boolean equals(java.lang.Object other)
equals contract is that they have the same IOR string and the same effective profile. i.e. if one profile is SSL enabled then this will return false.

Overrides:
equals in class java.lang.Object
Parameters:
other - an Object value
Returns:
a boolean value

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

decode

public void decode(org.omg.IOP.IOR _ior)
When multiple internet IOP tags are present, they will probably have different versions, we will use the highest version between 0 and 1.


getCodeSetComponentInfo

public CodeSetComponentInfo getCodeSetComponentInfo()

getORBTypeId

public java.lang.Integer getORBTypeId()

getIOR

public org.omg.IOP.IOR getIOR()

getIORString

public java.lang.String getIORString()

get_object_key

public byte[] get_object_key()

getProfiles

public java.util.List getProfiles()

getEffectiveProfile

public Profile getEffectiveProfile()

getTypeId

public java.lang.String getTypeId()

getIDString

public java.lang.String getIDString()

getMultipleComponents

public TaggedComponentList getMultipleComponents()

isNull

public boolean isNull()

parse

protected void parse(java.lang.String object_reference)
              throws java.lang.IllegalArgumentException
parse decodes the object_reference passed to ParsedIOR.

Parameters:
object_reference - a String value.
Throws:
java.lang.IllegalArgumentException - if object_reference is null or the designated resource cannot be found.

isParsableProtocol

public static boolean isParsableProtocol(java.lang.String check)
isParsableProtocol returns true if ParsedIOR can handle the protocol within the string.

Parameters:
check - a String a string containing a protocol.
Returns:
a boolean denoting whether ParsedIOR can handle this protocol

setProfileSelector

public void setProfileSelector(ProfileSelector sel)