Class MultiIbisIdentifier

  • All Implemented Interfaces:
    ibis.ipl.IbisIdentifier, java.io.Serializable, java.lang.Comparable<ibis.ipl.IbisIdentifier>

    public final class MultiIbisIdentifier
    extends java.lang.Object
    implements ibis.ipl.IbisIdentifier
    This implementation of the IbisIdentifier interface identifies an Ibis instance on the network.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      Location location
      The location for this Ibis instance.
      java.lang.String pool
      The name of the pool to which this Ibis instance belongs.
    • Constructor Summary

      Constructors 
      Constructor Description
      MultiIbisIdentifier​(byte[] codedForm)
      Constructs an IbisIdentifier from the specified coded form.
      MultiIbisIdentifier​(byte[] codedForm, int offset, int size)
      Constructs an IbisIdentifier from the specified coded form, at a particular offset and size.
      MultiIbisIdentifier​(java.io.ObjectInputStream dis)
      Reads an IbisIdentifier from the specified input stream.
      MultiIbisIdentifier​(java.lang.String id, java.util.HashMap<java.lang.String,​ibis.ipl.IbisIdentifier> idMap, byte[] registryData, Location location, java.lang.String pool, byte[] applicationTag)
      Constructs an IbisIdentifier with the specified parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(ibis.ipl.IbisIdentifier c)
      Compare to the specified Ibis identifier.
      boolean equals​(java.lang.Object o)  
      java.lang.String getID()  
      byte[] getRegistryData()
      Obtains the registry dependent data.
      int hashCode()  
      ibis.ipl.Location location()  
      java.lang.String name()  
      java.lang.String poolName()  
      ibis.ipl.IbisIdentifier subIdForIbis​(java.lang.String ibisName)  
      byte[] tag()  
      java.lang.String tagAsString()  
      byte[] toBytes()
      Returns the coded form of this IbisIdentifier.
      java.lang.String toString()  
      void writeTo​(java.io.DataOutput dos)
      Adds coded form of this IbisIdentifier to the specified output stream.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • location

        public final Location location
        The location for this Ibis instance.
      • pool

        public final java.lang.String pool
        The name of the pool to which this Ibis instance belongs.
    • Constructor Detail

      • MultiIbisIdentifier

        public MultiIbisIdentifier​(java.lang.String id,
                                   java.util.HashMap<java.lang.String,​ibis.ipl.IbisIdentifier> idMap,
                                   byte[] registryData,
                                   Location location,
                                   java.lang.String pool,
                                   byte[] applicationTag)
        Constructs an IbisIdentifier with the specified parameters.
        Parameters:
        id - join id, allocated by the registry.
        idMap - implementation-dependent data.
        registryData - registry-dependent data.
        location - location of this Ibis instance.
        pool - identifies the run with the registry.
        applicationTag - application tag
      • MultiIbisIdentifier

        public MultiIbisIdentifier​(byte[] codedForm)
                            throws java.io.IOException
        Constructs an IbisIdentifier from the specified coded form.
        Parameters:
        codedForm - the coded form.
        Throws:
        java.io.IOException - is thrown in case of trouble.
      • MultiIbisIdentifier

        public MultiIbisIdentifier​(byte[] codedForm,
                                   int offset,
                                   int size)
                            throws java.io.IOException
        Constructs an IbisIdentifier from the specified coded form, at a particular offset and size.
        Parameters:
        codedForm - the coded form.
        offset - offset in the coded form.
        size - size of the coded form.
        Throws:
        java.io.IOException - is thrown in case of trouble.
      • MultiIbisIdentifier

        public MultiIbisIdentifier​(java.io.ObjectInputStream dis)
                            throws java.io.IOException
        Reads an IbisIdentifier from the specified input stream.
        Parameters:
        dis - the input stream.
        Throws:
        java.io.IOException - is thrown in case of trouble.
    • Method Detail

      • toBytes

        public byte[] toBytes()
        Returns the coded form of this IbisIdentifier.
        Returns:
        the coded form.
      • writeTo

        public void writeTo​(java.io.DataOutput dos)
                     throws java.io.IOException
        Adds coded form of this IbisIdentifier to the specified output stream.
        Parameters:
        dos - the output stream.
        Throws:
        java.io.IOException - is thrown in case of trouble.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Specified by:
        toString in interface ibis.ipl.IbisIdentifier
        Overrides:
        toString in class java.lang.Object
      • name

        public java.lang.String name()
        Specified by:
        name in interface ibis.ipl.IbisIdentifier
      • location

        public ibis.ipl.Location location()
        Specified by:
        location in interface ibis.ipl.IbisIdentifier
      • poolName

        public java.lang.String poolName()
        Specified by:
        poolName in interface ibis.ipl.IbisIdentifier
      • getRegistryData

        public byte[] getRegistryData()
        Obtains the registry dependent data.
        Returns:
        the data.
      • compareTo

        public int compareTo​(ibis.ipl.IbisIdentifier c)
        Compare to the specified Ibis identifier.
        Specified by:
        compareTo in interface java.lang.Comparable<ibis.ipl.IbisIdentifier>
        Parameters:
        c - the Ibis identifier to compare to.
      • getID

        public java.lang.String getID()
      • tagAsString

        public java.lang.String tagAsString()
        Specified by:
        tagAsString in interface ibis.ipl.IbisIdentifier
      • tag

        public byte[] tag()
        Specified by:
        tag in interface ibis.ipl.IbisIdentifier
      • subIdForIbis

        public ibis.ipl.IbisIdentifier subIdForIbis​(java.lang.String ibisName)