Rice Pastry API

rice.p2p.scribe
Class Topic

java.lang.Object
  extended byrice.p2p.scribe.Topic
All Implemented Interfaces:
java.io.Serializable

public class Topic
extends java.lang.Object
implements java.io.Serializable

Version:
$Id: Topic.java 3274 2006-05-15 16:17:47Z jeffh $
Author:
Alan Mislove
See Also:
Serialized Form

Field Summary
protected  Id id
          The Id to which this topic is mapped
 
Constructor Summary
Topic(Id id)
          Constructor which takes an Id for this topic
Topic(IdFactory factory, java.lang.String name)
          Constructor which takes a name for this topic
Topic(InputBuffer buf, Endpoint endpoint)
          Constructor for Topic.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns whether this is equal to o or not
 Id getId()
          Returns the Id to which this topic is mapped
static Id getId(IdFactory factory, java.lang.String name)
          Returns the Id to which the string is mapped
 int hashCode()
          Returns the hashCode for this topic
 void serialize(OutputBuffer buf)
          DESCRIBE THE METHOD
 java.lang.String toString()
          Returns a String representation of this topic
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected Id id
The Id to which this topic is mapped

Constructor Detail

Topic

public Topic(Id id)
Constructor which takes an Id for this topic

Parameters:
id - The Id for this topic

Topic

public Topic(IdFactory factory,
             java.lang.String name)
Constructor which takes a name for this topic

Parameters:
factory - The factory to use when creating the id
name - The name for this topic

Topic

public Topic(InputBuffer buf,
             Endpoint endpoint)
      throws java.io.IOException
Constructor for Topic.

Parameters:
buf - DESCRIBE THE PARAMETER
endpoint - DESCRIBE THE PARAMETER
Throws:
java.io.IOException - DESCRIBE THE EXCEPTION
Method Detail

getId

public Id getId()
Returns the Id to which this topic is mapped

Returns:
The id to which this topic is mapped

equals

public boolean equals(java.lang.Object o)
Returns whether this is equal to o or not

Parameters:
o - The object to compare to
Returns:
Whether or not they are equal

hashCode

public int hashCode()
Returns the hashCode for this topic

Returns:
The hashcode for this topic

toString

public java.lang.String toString()
Returns a String representation of this topic

Returns:
A String representation of this topic

serialize

public void serialize(OutputBuffer buf)
               throws java.io.IOException
DESCRIBE THE METHOD

Parameters:
buf - DESCRIBE THE PARAMETER
Throws:
java.io.IOException - DESCRIBE THE EXCEPTION

getId

public static Id getId(IdFactory factory,
                       java.lang.String name)
Returns the Id to which the string is mapped

Parameters:
factory - The factory to use when creating the id
name - The string to map
Returns:
The id to which this string is mapped

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection