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.messaging
Class PublishMessage

    java.lang.Object
      rice.p2p.scribe.messaging.ScribeMessage
          rice.p2p.scribe.messaging.PublishMessage

All Implemented Interfaces:
  java.io.Serializable, Message, RawMessage

    public class PublishMessage

extends ScribeMessage

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

Field Summary
`protected RawScribeContent` | `content` DESCRIBE THE FIELD
`static short` | `TYPE` DESCRIBE THE FIELD

Fields inherited from class rice.p2p.scribe.messaging.ScribeMessage
`source, topic`

Fields inherited from interface rice.p2p.commonapi.Message
`HIGH_PRIORITY, LOW_PRIORITY, MAX_PRIORITY, MEDIUM_HIGH_PRIORITY, MEDIUM_LOW_PRIORITY, MEDIUM_PRIORITY`

Constructor Summary
`PublishMessage(NodeHandle source, Topic topic, RawScribeContent content)` Constructor for PublishMessage.
`PublishMessage(NodeHandle source, Topic topic, ScribeContent content)` Constructor which takes a unique integer Id

Method Summary
`static PublishMessage` | `build(InputBuffer buf, Endpoint endpoint, ScribeContentDeserializer scd)` DESCRIBE THE METHOD
`ScribeContent` | `getContent()` Returns the content
`short` | `getType()` Raw Serialization **************************************
`void` | `serialize(OutputBuffer buf)` DESCRIBE THE METHOD
`void` | `setContent(ScribeContent content)` Sets the Content attribute of the PublishMessage object
`java.lang.String` | `toString()` Converts to a String representation of the object.

Methods inherited from class rice.p2p.scribe.messaging.ScribeMessage
`getPriority, getSource, getTopic, setSource`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### content

    protected RawScribeContent content

  DESCRIBE THE FIELD

### TYPE

    public static final short TYPE

  DESCRIBE THE FIELD

  See Also:
    Constant Field Values

Constructor Detail

### PublishMessage

    public PublishMessage(NodeHandle source,
                          Topic topic,
                          ScribeContent content)

  Constructor which takes a unique integer Id

  Parameters:
    `source` - The source address
    `topic` - DESCRIBE THE PARAMETER
    `content` - DESCRIBE THE PARAMETER

### PublishMessage

    public PublishMessage(NodeHandle source,
                          Topic topic,
                          RawScribeContent content)

  Constructor for PublishMessage.

  Parameters:
    `source` - DESCRIBE THE PARAMETER
    `topic` - DESCRIBE THE PARAMETER
    `content` - DESCRIBE THE PARAMETER

Method Detail

### getContent

    public ScribeContent getContent()

  Returns the content

  Returns:
    The content

### getType

    public short getType()

  Raw Serialization **************************************

  Returns:
    The Type value

### setContent

    public void setContent(ScribeContent content)

  Sets the Content attribute of the PublishMessage object

  Parameters:
    `content` - The new Content value

### toString

    public java.lang.String toString()

  Converts to a String representation of the object.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    A string representation of the object.

### serialize

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

  DESCRIBE THE METHOD

  Specified by:
    `serialize` in interface `RawMessage`
  Overrides:
    `serialize` in class `ScribeMessage`
  Parameters:
    `buf` - DESCRIBE THE PARAMETER
  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### build

    public static PublishMessage build(InputBuffer buf,
                                       Endpoint endpoint,
                                       ScribeContentDeserializer scd)
                                throws java.io.IOException

  DESCRIBE THE METHOD

  Parameters:
    `buf` - DESCRIBE THE PARAMETER
    `endpoint` - DESCRIBE THE PARAMETER
    `scd` - DESCRIBE THE PARAMETER
  Returns:
    DESCRIBE THE RETURN VALUE
  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

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.