Class IORImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int cachedHashValue  
      private ORB factory  
      private IORTemplateList iortemps
      This variable is set directly from the constructors that take an IORTemplate or IORTemplateList as arguments; otherwise it is derived from the list of TaggedProfile instances on the first call to getIORTemplates.
      private boolean isCachedHashValue  
      private java.lang.String typeId  
      (package private) static IORSystemException wrapper  
      • Fields inherited from class java.util.AbstractList

        modCount
    • Constructor Summary

      Constructors 
      Constructor Description
      IORImpl​(ORB orb)
      Construct an empty IOR.
      IORImpl​(ORB orb, java.lang.String typeid)  
      IORImpl​(ORB orb, java.lang.String typeId, IORTemplateList iortemps, ObjectId id)
      Construct an IOR from an IORTemplate by applying the same object id to each TaggedProfileTemplate in the IORTemplate.
      IORImpl​(ORB orb, java.lang.String typeId, IORTemplate iortemp, ObjectId id)
      Construct an IOR from an IORTemplate by applying the same object id to each TaggedProfileTemplate in the IORTemplate.
      IORImpl​(ORB orb, InputStream is)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void addTaggedProfiles​(IORTemplate iortemp, ObjectId id)  
      boolean equals​(java.lang.Object obj)
      Return true if this IOR is equivalent to ior.
      IOR getIOPIOR()
      Return a representation of this IOR in the standard GIOP marshalled form.
      IORTemplateList getIORTemplates()
      Return the IORTemplateList for this IOR.
      ORB getORB()  
      IIOPProfile getProfile()
      Return the first IIOPProfile in this IOR.
      java.util.Iterator<TaggedProfile> getTaggedProfiles()  
      java.lang.String getTypeId()
      Return the type id string from the IOR.
      int hashCode()  
      private void initializeIORTemplateList()  
      boolean isEquivalent​(IOR ior)
      Return true if this IOR is equivalent to ior.
      boolean isNil()
      Return true if this IOR has no profiles.
      void makeImmutable()  
      java.lang.String stringify()
      Return a representation of this IOR in the standard GIOP stringified format that begins with "IOR:".
      java.lang.String toString()  
      void write​(OutputStream os)
      Write this object directly to the output stream.
      • Methods inherited from class java.util.AbstractList

        add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange
      • Methods inherited from class java.util.AbstractCollection

        addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        add, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
    • Field Detail

      • typeId

        private java.lang.String typeId
      • factory

        private ORB factory
      • isCachedHashValue

        private boolean isCachedHashValue
      • cachedHashValue

        private int cachedHashValue
      • iortemps

        private IORTemplateList iortemps
        This variable is set directly from the constructors that take an IORTemplate or IORTemplateList as arguments; otherwise it is derived from the list of TaggedProfile instances on the first call to getIORTemplates. Note that we assume that an IOR with mutiple TaggedProfile instances has the same ObjectId in each TaggedProfile, as otherwise the IOR could never be created through an ObjectReferenceFactory.
    • Constructor Detail

      • IORImpl

        public IORImpl​(ORB orb)
        Construct an empty IOR. This is needed for null object references.
        Parameters:
        orb - ORB to use as factory
      • IORImpl

        public IORImpl​(ORB orb,
                       java.lang.String typeid)
      • IORImpl

        public IORImpl​(ORB orb,
                       java.lang.String typeId,
                       IORTemplate iortemp,
                       ObjectId id)
        Construct an IOR from an IORTemplate by applying the same object id to each TaggedProfileTemplate in the IORTemplate.
        Parameters:
        orb - ORB to use
        typeId - ID of type to use
        iortemp - Template to use
        id - ID of created object
      • IORImpl

        public IORImpl​(ORB orb,
                       java.lang.String typeId,
                       IORTemplateList iortemps,
                       ObjectId id)
        Construct an IOR from an IORTemplate by applying the same object id to each TaggedProfileTemplate in the IORTemplate.
        Parameters:
        orb - ORB to use
        typeId - ID of type to use
        iortemps - list of templates
        id - ID of created object
    • Method Detail

      • getORB

        public ORB getORB()
        Specified by:
        getORB in interface IOR
      • equals

        public boolean equals​(java.lang.Object obj)
        Description copied from interface: IOR
        Return true if this IOR is equivalent to ior. Here equivalent means that the typeids and delegates are the same. It does not check if the profiles are the same or of the same number.
        Specified by:
        equals in interface java.util.Collection<TaggedProfile>
        Specified by:
        equals in interface IOR
        Specified by:
        equals in interface java.util.List<TaggedProfile>
        Overrides:
        equals in class FreezableList<TaggedProfile>
        Parameters:
        obj - object to compare to
        Returns:
        true if they are equivalent
        See Also:
        IOR.isEquivalent(IOR)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.AbstractCollection<TaggedProfile>
      • getTypeId

        public java.lang.String getTypeId()
        Description copied from interface: IOR
        Return the type id string from the IOR.
        Specified by:
        getTypeId in interface IOR
        Returns:
        type id string
      • write

        public void write​(OutputStream os)
        Description copied from interface: Writeable
        Write this object directly to the output stream.
        Specified by:
        write in interface Writeable
        Parameters:
        os - stream to write to
      • stringify

        public java.lang.String stringify()
        Description copied from interface: IOR
        Return a representation of this IOR in the standard GIOP stringified format that begins with "IOR:". This does not return the same as Object.toString()
        Specified by:
        stringify in interface IOR
        Returns:
        String representation
        See Also:
        Object.toString()
      • getIOPIOR

        public IOR getIOPIOR()
        Description copied from interface: IOR
        Return a representation of this IOR in the standard GIOP marshalled form.
        Specified by:
        getIOPIOR in interface IOR
        Returns:
        a representation of this IOR
      • isNil

        public boolean isNil()
        Description copied from interface: IOR
        Return true if this IOR has no profiles.
        Specified by:
        isNil in interface IOR
        Returns:
        true if there aren't any profiles, false otherwise
      • isEquivalent

        public boolean isEquivalent​(IOR ior)
        Description copied from interface: IOR
        Return true if this IOR is equivalent to ior. Here equivalent means that the typeids are the same, they have the same number of profiles, and each profile is equivalent to the corresponding profile.
        Specified by:
        isEquivalent in interface IOR
        Parameters:
        ior - IOR to compare to
        Returns:
        true if they are equivalent
        See Also:
        IOR.equals(java.lang.Object)
      • initializeIORTemplateList

        private void initializeIORTemplateList()
      • getIORTemplates

        public IORTemplateList getIORTemplates()
        Return the IORTemplateList for this IOR. Will throw exception if it is not possible to generate an IOR from the IORTemplateList that is equal to this IOR, which can only happen if not every TaggedProfile in the IOR has the same ObjectId.
        Specified by:
        getIORTemplates in interface IOR
        Returns:
        the IORTemplate for this IOR
      • getProfile

        public IIOPProfile getProfile()
        Return the first IIOPProfile in this IOR. Originally we planned to remove this, because we planned to use multiple IIOP profiles. However, we really have no need for multiple profiles in the ORB, so we will probably never remove this API.
        Specified by:
        getProfile in interface IOR
        Returns:
        the first IIOPProfile