Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.p2p.scribe
Class Topic

    java.lang.Object
      rice.p2p.scribe.Topic

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<Topic>

    public class Topic

extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<Topic>

Version:
  $Id: Topic.java 3653 2007-03-27 18:39:52Z 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)`

Method Summary
`int` | `compareTo(Topic that)`
`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)`
`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

Throws:
  `java.io.IOException`

Method Detail

### getId

    public Id getId()

  Returns the Id to which this topic is mapped

  Returns:
    The id to which this topic is mapped

### 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

### equals

    public boolean equals(java.lang.Object o)

  Returns whether this is equal to o or not

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `o` - The object to compare to
  Returns:
    Whether or not they are equal

### hashCode

    public int hashCode()

  Returns the hashCode for this topic

  Overrides:
    `hashCode` in class `java.lang.Object`
  Returns:
    The hashcode for this topic

### toString

    public java.lang.String toString()

  Returns a String representation of this topic

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    A String representation of this topic

### serialize

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

  Throws:
    `java.io.IOException`

### compareTo

    public int compareTo(Topic that)

  Specified by:
    `compareTo` in interface `java.lang.Comparable<Topic>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.