Package ibis.ipl.impl.multi
Class MultiIbisIdentifier
- java.lang.Object
-
- ibis.ipl.impl.multi.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.IbisIdentifierThis implementation of theIbisIdentifierinterface identifies an Ibis instance on the network.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MultiIbisIdentifier(byte[] codedForm)Constructs anIbisIdentifierfrom the specified coded form.MultiIbisIdentifier(byte[] codedForm, int offset, int size)Constructs anIbisIdentifierfrom the specified coded form, at a particular offset and size.MultiIbisIdentifier(java.io.ObjectInputStream dis)Reads anIbisIdentifierfrom 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 anIbisIdentifierwith the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ibis.ipl.IbisIdentifier c)Compare to the specified Ibis identifier.booleanequals(java.lang.Object o)java.lang.StringgetID()byte[]getRegistryData()Obtains the registry dependent data.inthashCode()ibis.ipl.Locationlocation()java.lang.Stringname()java.lang.StringpoolName()ibis.ipl.IbisIdentifiersubIdForIbis(java.lang.String ibisName)byte[]tag()java.lang.StringtagAsString()byte[]toBytes()Returns the coded form of thisIbisIdentifier.java.lang.StringtoString()voidwriteTo(java.io.DataOutput dos)Adds coded form of thisIbisIdentifierto the specified output stream.
-
-
-
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 anIbisIdentifierwith 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.IOExceptionConstructs anIbisIdentifierfrom 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.IOExceptionConstructs anIbisIdentifierfrom 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.IOExceptionReads anIbisIdentifierfrom 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 thisIbisIdentifier.- Returns:
- the coded form.
-
writeTo
public void writeTo(java.io.DataOutput dos) throws java.io.IOExceptionAdds coded form of thisIbisIdentifierto 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Specified by:
toStringin interfaceibis.ipl.IbisIdentifier- Overrides:
toStringin classjava.lang.Object
-
name
public java.lang.String name()
- Specified by:
namein interfaceibis.ipl.IbisIdentifier
-
location
public ibis.ipl.Location location()
- Specified by:
locationin interfaceibis.ipl.IbisIdentifier
-
poolName
public java.lang.String poolName()
- Specified by:
poolNamein interfaceibis.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:
compareToin interfacejava.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:
tagAsStringin interfaceibis.ipl.IbisIdentifier
-
tag
public byte[] tag()
- Specified by:
tagin interfaceibis.ipl.IbisIdentifier
-
subIdForIbis
public ibis.ipl.IbisIdentifier subIdForIbis(java.lang.String ibisName)
-
-