org.nhindirect.stagent
Class IncomingMessage

java.lang.Object
  extended by org.nhindirect.stagent.DefaultMessageEnvelope
      extended by org.nhindirect.stagent.IncomingMessage
All Implemented Interfaces:
MessageEnvelope

public class IncomingMessage
extends DefaultMessageEnvelope

Incoming messages are specific types of MessageEnvelope that have been signed and encrypted.

Author:
Greg Meyer, Umesh Madan

Constructor Summary
IncomingMessage(Message message)
          Constructs an incoming envelope from a message.
IncomingMessage(Message message, NHINDAddressCollection recipients, NHINDAddress sender)
          Constructs an incoming envelope from a message, a list of recipients, and a sender.
IncomingMessage(String message)
          Constructs an incoming envelope from a message represented by a raw string..
IncomingMessage(String message, NHINDAddressCollection recipients, NHINDAddress sender)
          Constructs an incoming envelope from a message represented as a raw string, a list of recipients, and a sender.
 
Method Summary
 Collection<DefaultMessageSignatureImpl> getSenderSignatures()
          Gets the collection of individual signers of the message.
 org.bouncycastle.cms.CMSSignedData getSignature()
          Gets the message signature data.
 boolean hasSenderSignatures()
          Indicates if the message has signers.
 boolean hasSignatures()
          Indicates if the message has signature.
 void setSenderSignatures(Collection<DefaultMessageSignatureImpl> senderSignatures)
          Sets the collection of signers of a message.
 void setSignature(org.bouncycastle.cms.CMSSignedData sig)
          Sets the message signature data.
 
Methods inherited from class org.nhindirect.stagent.DefaultMessageEnvelope
ensureRecipientsCategorizedByDomain, getAgent, getDomainRecipients, getMessage, getOtherRecipients, getRecipients, getRejectedRecipients, getSender, hasDomainRecipients, hasOtherRecipients, hasRecipients, hasRejectedRecipients, serializeMessage, setAgent, setMessage
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncomingMessage

public IncomingMessage(Message message)
Constructs an incoming envelope from a message.

Parameters:
message - The incoming message.

IncomingMessage

public IncomingMessage(String message)
Constructs an incoming envelope from a message represented by a raw string..

Parameters:
message - The incoming message.

IncomingMessage

@Inject
public IncomingMessage(Message message,
                              NHINDAddressCollection recipients,
                              NHINDAddress sender)
Constructs an incoming envelope from a message, a list of recipients, and a sender. This is intended to override the standard to and from headers in the incoming message.

Parameters:
message - The incoming message.
recipients - A collection of addresses that denote the recipients of the message.
sender - The original sender of the message.

IncomingMessage

public IncomingMessage(String message,
                       NHINDAddressCollection recipients,
                       NHINDAddress sender)
Constructs an incoming envelope from a message represented as a raw string, a list of recipients, and a sender. This is intended to override the standard to and from headers in the incoming message.

Parameters:
message - The incoming message.
recipients - A collection of addresses that denote the recipients of the message.
sender - The original sender of the message.
Method Detail

getSignature

public org.bouncycastle.cms.CMSSignedData getSignature()
Gets the message signature data. This includes the all the attributes of the signature block and in the case of enveloped signatures it will also include the signed content

Returns:
The message signature data.

setSignature

public void setSignature(org.bouncycastle.cms.CMSSignedData sig)
Sets the message signature data.

Parameters:
value - The message signature data.

hasSignatures

public boolean hasSignatures()
Indicates if the message has signature.

Returns:
True if the message has signatures. False other wise.

getSenderSignatures

public Collection<DefaultMessageSignatureImpl> getSenderSignatures()
Gets the collection of individual signers of the message. This is a subset of data of the signature, but includes additional information such as the singers certificate and validation flags.

Returns:
The collection of signers.

setSenderSignatures

public void setSenderSignatures(Collection<DefaultMessageSignatureImpl> senderSignatures)
Sets the collection of signers of a message.

Parameters:
senderSignatures - The collection of signers of a message.

hasSenderSignatures

public boolean hasSenderSignatures()
Indicates if the message has signers.

Returns:
True if the message has signers. False otherwise.


Copyright © 2010-2015 NHIN Direct. All Rights Reserved.