Rice Pastry API

rice.p2p.past.messaging
Class CacheMessage

java.lang.Object
  extended byrice.p2p.past.messaging.PastMessage
      extended byrice.p2p.past.messaging.CacheMessage
All Implemented Interfaces:
Message, RawMessage, java.io.Serializable

public class CacheMessage
extends PastMessage

Version:
$Id: CacheMessage.java 3274 2006-05-15 16:17:47Z jeffh $
Author:
Alan Mislove, Ansley Post, Peter Druschel
See Also:
Serialized Form

Field Summary
protected  RawPastContent content
          DESCRIBE THE FIELD
static short TYPE
          DESCRIBE THE FIELD
 
Fields inherited from class rice.p2p.past.messaging.PastMessage
dest, id, isResponse, source
 
Fields inherited from interface rice.p2p.commonapi.Message
HIGH_PRIORITY, LOW_PRIORITY, MAX_PRIORITY, MEDIUM_HIGH_PRIORITY, MEDIUM_LOW_PRIORITY, MEDIUM_PRIORITY
 
Constructor Summary
CacheMessage(int uid, PastContent content, NodeHandle source, Id dest)
          Constructor which takes a unique integer Id and the local id
CacheMessage(int uid, RawPastContent content, NodeHandle source, Id dest)
          Constructor for CacheMessage.
 
Method Summary
static CacheMessage build(InputBuffer buf, Endpoint endpoint, PastContentDeserializer pcd)
          DESCRIBE THE METHOD
 PastContent getContent()
          Method which returns the content
 short getType()
          Raw Serialization **************************************
 void returnResponse(Continuation c, Environment env, java.lang.String instance)
          Method by which this message is supposed to return it's response.
 void serialize(OutputBuffer buf)
          DESCRIBE THE METHOD
 java.lang.String toString()
          Returns a string representation of this message
 
Methods inherited from class rice.p2p.past.messaging.PastMessage
addHop, getDestination, getPriority, getSource, getUID, isResponse, setResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

content

protected RawPastContent content
DESCRIBE THE FIELD


TYPE

public static final short TYPE
DESCRIBE THE FIELD

See Also:
Constant Field Values
Constructor Detail

CacheMessage

public CacheMessage(int uid,
                    PastContent content,
                    NodeHandle source,
                    Id dest)
Constructor which takes a unique integer Id and the local id

Parameters:
uid - The unique id
content - DESCRIBE THE PARAMETER
source - DESCRIBE THE PARAMETER
dest - DESCRIBE THE PARAMETER

CacheMessage

public CacheMessage(int uid,
                    RawPastContent content,
                    NodeHandle source,
                    Id dest)
Constructor for CacheMessage.

Parameters:
uid - DESCRIBE THE PARAMETER
content - DESCRIBE THE PARAMETER
source - DESCRIBE THE PARAMETER
dest - DESCRIBE THE PARAMETER
Method Detail

getContent

public PastContent getContent()
Method which returns the content

Returns:
The content

getType

public short getType()
Raw Serialization **************************************

Returns:
The Type value

returnResponse

public void returnResponse(Continuation c,
                           Environment env,
                           java.lang.String instance)
Method by which this message is supposed to return it's response.

Specified by:
returnResponse in class PastMessage
Parameters:
c - The continuation to return the reponse to.
env - DESCRIBE THE PARAMETER
instance - DESCRIBE THE PARAMETER

toString

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

Returns:
A string representing this message

serialize

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

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

build

public static CacheMessage build(InputBuffer buf,
                                 Endpoint endpoint,
                                 PastContentDeserializer pcd)
                          throws java.io.IOException
DESCRIBE THE METHOD

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

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection