Project JXTA

net.jxta.impl.id.binaryID
Class PipeBinaryID

java.lang.Object
  extended by net.jxta.id.ID
      extended by net.jxta.pipe.PipeID
          extended by net.jxta.impl.id.binaryID.PipeBinaryID
All Implemented Interfaces:
Serializable

public final class PipeBinaryID
extends PipeID

This class implements a Pipe ID. Each pipe is assigned a unique id.

Author:
Daniel Brookshier turbogeek@cluck.com
See Also:
ID, IDFactory, PeerGroupID, Serialized Form

Field Summary
protected  String id
          The id data
 
Fields inherited from class net.jxta.id.ID
nullID, URIEncodingName, URNNamespace
 
Constructor Summary
protected PipeBinaryID()
          Used only internally
(package private) PipeBinaryID(BinaryID id)
          Constructor.
  PipeBinaryID(PeerGroupID parent, byte[] data, boolean lengthIncluded)
          Constructor.
protected PipeBinaryID(String id)
          Creates a ID from a string.
 
Method Summary
 boolean equals(Object target)
          
protected  String getID()
          returns the coded ID without the binaryid tag.
 String getIDFormat()
          
 ID getPeerGroupID()
          
 Object getUniqueValue()
          
 URL getURL()
          
 int hashCode()
          
 
Methods inherited from class net.jxta.id.ID
clone, create, toString, toURI
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected String id
The id data

Constructor Detail

PipeBinaryID

protected PipeBinaryID()
Used only internally


PipeBinaryID

protected PipeBinaryID(String id)
Creates a ID from a string. Note that the ID is not currently validated.

Parameters:
id - Value of ID.

PipeBinaryID

PipeBinaryID(BinaryID id)
Constructor. Intializes contents from provided ID.

Parameters:
id - the ID data

PipeBinaryID

public PipeBinaryID(PeerGroupID parent,
                    byte[] data,
                    boolean lengthIncluded)
Constructor. Creates a PipeID. A PeerGroupID is provided. Note that only the peer group's primary node is used to build this node. We don't want to be appending great grand parents.

Parameters:
parent - the group to which this will belong.
data - DOCUMENT ME!
lengthIncluded - DOCUMENT ME!
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()

Specified by:
getIDFormat in class ID

getUniqueValue

public Object getUniqueValue()

Specified by:
getUniqueValue in class ID

getURL

public URL getURL()

Specified by:
getURL in class ID

getPeerGroupID

public ID getPeerGroupID()

Specified by:
getPeerGroupID in class PipeID

getID

protected String getID()
returns the coded ID without the binaryid tag.

Returns:
Returns the raw string used to create the urn!

JXTA J2SE