JXTA

net.jxta.impl.id.UUID
Class PipeID

java.lang.Object
  extended by net.jxta.id.ID
      extended by net.jxta.pipe.PipeID
          extended by net.jxta.impl.id.UUID.PipeID
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PipeID

public class PipeID
extends PipeID

An implementation of the PipeID ID Type.

See Also:
Serialized Form

Field Summary
protected static int groupIdOffset
           
protected  IDBytes id
          The id data
protected static int idOffset
           
protected static int padOffset
           
protected static int padSize
           
 
Fields inherited from class net.jxta.id.ID
nullID, URIEncodingName, URNNamespace
 
Constructor Summary
protected PipeID()
          Used only internally
protected PipeID(IDBytes id)
          Constructor.
  PipeID(PeerGroupID groupID)
          See IDFactory.Instantiator.newPipeID(net.jxta.peergroup.PeerGroupID).
  PipeID(PeerGroupID groupID, byte[] seed)
          See IDFactory.Instantiator.newPipeID(net.jxta.peergroup.PeerGroupID,byte[]).
protected PipeID(UUID groupUUID, UUID idUUID)
          Creates a PipeID.
 
Method Summary
 boolean equals(Object target)
          
 String getIDFormat()
          Returns a string identifier which indicates which ID format is used by this ID instance.
 ID getPeerGroupID()
          Returns PeerGroupID of the Peer Group to which this Pipe ID belongs.
 Object getUniqueValue()
          Returns an object containing the unique value of the ID.
 int hashCode()
          
 
Methods inherited from class net.jxta.pipe.PipeID
create, intern
 
Methods inherited from class net.jxta.id.ID
getURL, toString, toURI
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

groupIdOffset

protected static final int groupIdOffset
See Also:
Constant Field Values

idOffset

protected static final int idOffset
See Also:
Constant Field Values

padOffset

protected static final int padOffset
See Also:
Constant Field Values

padSize

protected static final int padSize
See Also:
Constant Field Values

id

protected IDBytes id
The id data

Constructor Detail

PipeID

protected PipeID()
Used only internally


PipeID

protected PipeID(IDBytes id)
Constructor. Initializes contents from provided ID.

Parameters:
id - the ID data

PipeID

protected PipeID(UUID groupUUID,
                 UUID idUUID)
Creates a PipeID. A PeerGroupID is provided

Parameters:
groupUUID - the UUID of the group to which this will belong.
idUUID - the UUID which will be used for this pipe.

PipeID

public PipeID(PeerGroupID groupID)
See IDFactory.Instantiator.newPipeID(net.jxta.peergroup.PeerGroupID).


PipeID

public PipeID(PeerGroupID groupID,
              byte[] seed)
See IDFactory.Instantiator.newPipeID(net.jxta.peergroup.PeerGroupID,byte[]).

Method Detail

equals

public boolean equals(Object target)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

getIDFormat

public String getIDFormat()
Returns a string identifier which indicates which ID format is used by this ID instance.

Specified by:
getIDFormat in class ID
Returns:
a string identifier which indicates which ID format is used by this ID instance.

getUniqueValue

public Object getUniqueValue()
Returns an object containing the unique value of the ID. This object must provide implementations of toString(), equals() and hashCode() that are canonical and consistent from run-to-run given the same input values. Beyond this nothing should be assumed about the nature of this object. For some implementations the object returned may be this.

Specified by:
getUniqueValue in class ID
Returns:
Object which can provide canonical representations of the ID.

getPeerGroupID

public ID getPeerGroupID()
Returns PeerGroupID of the Peer Group to which this Pipe ID belongs.

Specified by:
getPeerGroupID in class PipeID
Returns:
The PeerGroupID of the Peer Group to which this Pipe ID belongs.

JXSE