Rice Pastry API

rice.pastry.commonapi
Class PastryEndpointMessage

java.lang.Object
  extended by rice.pastry.messaging.Message
      extended by rice.pastry.messaging.PRawMessage
          extended by rice.pastry.commonapi.PastryEndpointMessage
All Implemented Interfaces:
java.io.Serializable, Message, RawMessage, RawSerializable

public class PastryEndpointMessage
extends PRawMessage

This class is an internal message to the commonapi gluecode.

Version:
$Id: PastryEndpointMessage.java 4295 2008-07-18 15:38:04Z jeffh $
Author:
Alan Mislove, Peter Druschel
See Also:
Serialized Form

Field Summary
protected  RawMessage message
           
 
Fields inherited from class rice.pastry.messaging.Message
DEFAULT_PRIORITY_LEVEL
 
Fields inherited from interface rice.p2p.commonapi.Message
DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY, LOWEST_PRIORITY, MAX_PRIORITY, MEDIUM_HIGH_PRIORITY, MEDIUM_LOW_PRIORITY, MEDIUM_PRIORITY
 
Constructor Summary
PastryEndpointMessage(int address, InputBuffer buf, MessageDeserializer md, short type, int priority, NodeHandle sender)
           
PastryEndpointMessage(int address, Message message, NodeHandle sender)
          Constructor.
PastryEndpointMessage(int address, RawMessage message, NodeHandle sender)
           
 
Method Summary
static void checkRawType(RawMessage message)
           
 Message getMessage()
          Returns the internal message
 short getType()
          Raw Serialization
 void serialize(OutputBuffer buf)
           
 void setMessage(Message message)
          Returns the internal message
 void setMessage(RawMessage message)
          Returns the internal message
 java.lang.String toString()
          Returns the String representation of this message
 
Methods inherited from class rice.pastry.messaging.Message
getDate, getDestination, getPriority, getSender, getSenderId, setPriority, setSender, stamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface rice.p2p.commonapi.Message
getPriority
 

Field Detail

message

protected RawMessage message
Constructor Detail

PastryEndpointMessage

public PastryEndpointMessage(int address,
                             Message message,
                             NodeHandle sender)
Constructor.

Parameters:
pn - the pastry node that the application attaches to.

PastryEndpointMessage

public PastryEndpointMessage(int address,
                             RawMessage message,
                             NodeHandle sender)

PastryEndpointMessage

public PastryEndpointMessage(int address,
                             InputBuffer buf,
                             MessageDeserializer md,
                             short type,
                             int priority,
                             NodeHandle sender)
                      throws java.io.IOException
Throws:
java.io.IOException
Method Detail

checkRawType

public static void checkRawType(RawMessage message)

getMessage

public Message getMessage()
Returns the internal message

Returns:
the credentials.

setMessage

public void setMessage(Message message)
Returns the internal message


setMessage

public void setMessage(RawMessage message)
Returns the internal message


toString

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

Overrides:
toString in class java.lang.Object
Returns:
The string

getType

public short getType()
Raw Serialization


serialize

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

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection