ePOST API

rice.post.messaging
Class SignedPostMessage

java.lang.Object
  extended by rice.post.messaging.SignedPostMessage
All Implemented Interfaces:
java.io.Serializable

public final class SignedPostMessage
extends java.lang.Object
implements java.io.Serializable

This class is the representation of a PostMessage and it's attached signature. This class should be the one which is sent across the wire.

See Also:
Serialized Form

Constructor Summary
SignedPostMessage(PostMessage message, java.security.PrivateKey key)
          Constructs a SignedPostMessage given the message and siganture
 
Method Summary
 void dump()
           
 boolean equals(java.lang.Object o)
           
 PostMessage getMessage()
          Returns the sender of this message.
 byte[] getMessageBytes()
           
 byte[] getSignature()
          Returns the signature for this message, or null if the message has not yet been signed.
 java.lang.String toString()
           
 boolean verify(java.security.PublicKey key)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SignedPostMessage

public SignedPostMessage(PostMessage message,
                         java.security.PrivateKey key)
                  throws java.io.IOException
Constructs a SignedPostMessage given the message and siganture

Parameters:
sender - The sender of this message.
Throws:
java.io.IOException
Method Detail

getMessage

public PostMessage getMessage()
Returns the sender of this message.

Returns:
The sender

getMessageBytes

public byte[] getMessageBytes()

getSignature

public byte[] getSignature()
Returns the signature for this message, or null if the message has not yet been signed.

Returns:
The signature, or null if not yet signed.

verify

public boolean verify(java.security.PublicKey key)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

dump

public void dump()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

ePOST API

Copyright © 2001-2005 - Rice Pastry.