JXTA

net.jxta.impl.id.CBID
Class PeerID

java.lang.Object
  extended by net.jxta.id.ID
      extended by net.jxta.peer.PeerID
          extended by net.jxta.impl.id.UUID.PeerID
              extended by net.jxta.impl.id.CBID.PeerID
All Implemented Interfaces:
Serializable

public class PeerID
extends PeerID

An implementation of the PeerID ID Type.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.jxta.impl.id.UUID.PeerID
groupIdOffset, id, idOffset, padOffset, padSize
 
Fields inherited from class net.jxta.id.ID
nullID, URIEncodingName, URNNamespace
 
Constructor Summary
protected PeerID()
          Used only internally.
protected PeerID(IDBytes id)
          Intializes contents from provided ID.
  PeerID(PeerGroupID groupID)
          See IDFactory.Instantiator.newPeerID(net.jxta.peergroup.PeerGroupID).
  PeerID(PeerGroupID groupID, byte[] seed)
          See IDFactory.Instantiator.newPeerID(net.jxta.peergroup.PeerGroupID,byte[]).
protected PeerID(UUID groupUUID, UUID peerUUID)
          Creates a PeerID.
 
Method Summary
 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 Peer ID belongs.
 UUID getUUID()
          Returns the UUID associated with this PeerID.
 
Methods inherited from class net.jxta.impl.id.UUID.PeerID
equals, getUniqueValue, hashCode
 
Methods inherited from class net.jxta.peer.PeerID
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
 

Constructor Detail

PeerID

protected PeerID()
Used only internally.


PeerID

public PeerID(PeerGroupID groupID)
See IDFactory.Instantiator.newPeerID(net.jxta.peergroup.PeerGroupID).

Parameters:
groupID - the PeerGroupID

PeerID

protected PeerID(IDBytes id)
Intializes contents from provided ID.

Parameters:
id - the ID data

PeerID

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

Parameters:
groupID - the PeerGroupID
seed - the seed

PeerID

protected PeerID(UUID groupUUID,
                 UUID peerUUID)
Creates a PeerID. A PeerGroupID is provided

Parameters:
groupUUID - the group to which this will belong.
peerUUID - id of this peer
Method Detail

getIDFormat

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

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

getPeerGroupID

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

Overrides:
getPeerGroupID in class PeerID
Returns:
PeerGroupID of the Peer Group to which this Peer ID belongs.

getUUID

public UUID getUUID()
Returns the UUID associated with this PeerID.

Returns:
The UUID associated with this PeerID.

JXSE