ePOST API

rice.post.delivery
Class Delivery

java.lang.Object
  extended by rice.p2p.past.ContentHashPastContent
      extended by rice.post.delivery.Delivery
All Implemented Interfaces:
java.io.Serializable, GCPastContent, PastContent
Direct Known Subclasses:
Receipt, Undeliverable

public class Delivery
extends ContentHashPastContent
implements GCPastContent

The delivery stored in Past

Version:
$Id: Delivery.java 2962 2006-01-25 19:20:17Z jstewart $
Author:
Alan Mislove, Ansley Post, Peter Druschel
See Also:
Serialized Form

Nested Class Summary
protected static class Delivery.DeliveryHandle
           
 
Field Summary
protected  SignedPostMessage message
          The internal encrypted message
 
Fields inherited from class rice.p2p.past.ContentHashPastContent
myId
 
Constructor Summary
protected Delivery(SignedPostMessage message, Id id)
          Constructor which takes the wrapped message
protected Delivery(SignedPostMessage message, IdFactory factory)
          Constructor which takes the wrapped message
 
Method Summary
 GCPastContentHandle getHandle(GCPast local, long expiration)
          Produces a handle for this content object.
 EncryptedNotificationMessage getMessage()
          Returns the internal message
 GCPastMetadata getMetadata(long expiration)
          Returns the metadata which should be stored with this object.
 SignedPostMessage getSignedMessage()
          Returns the internal signed message
 long getVersion()
          Returns the version number associated with this PastContent object - version numbers are designed to be monotonically increasing numbers which signify different versions of the same object.
 
Methods inherited from class rice.p2p.past.ContentHashPastContent
checkInsert, getHandle, getId, isMutable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface rice.p2p.past.PastContent
checkInsert, getHandle, getId, isMutable
 

Field Detail

message

protected SignedPostMessage message
The internal encrypted message

Constructor Detail

Delivery

protected Delivery(SignedPostMessage message,
                   IdFactory factory)
Constructor which takes the wrapped message

Parameters:
message - The message to deliver

Delivery

protected Delivery(SignedPostMessage message,
                   Id id)
Constructor which takes the wrapped message

Parameters:
message - The message to deliver
Method Detail

getSignedMessage

public SignedPostMessage getSignedMessage()
Returns the internal signed message

Returns:
The wrapped message

getMessage

public EncryptedNotificationMessage getMessage()
Returns the internal message

Returns:
The wrapped message

getVersion

public long getVersion()
Returns the version number associated with this PastContent object - version numbers are designed to be monotonically increasing numbers which signify different versions of the same object.

Specified by:
getVersion in interface GCPastContent
Returns:
The version number of this object

getHandle

public GCPastContentHandle getHandle(GCPast local,
                                     long expiration)
Produces a handle for this content object. The handle is retrieved and returned to the client as a result of the Past.lookupHandles() method.

Specified by:
getHandle in interface GCPastContent
Parameters:
The - local GCPast service which the content is on.
Returns:
the handle

getMetadata

public GCPastMetadata getMetadata(long expiration)
Returns the metadata which should be stored with this object. Allows applications to add arbitrary items into the object's metadata.

Specified by:
getMetadata in interface GCPastContent
Parameters:
The - local GCPast service which the content is on.
Returns:
the handle

ePOST API

Copyright © 2001-2005 - Rice Pastry.