org.nhindirect.stagent
Interface NHINDAgent

All Known Implementing Classes:
DefaultNHINDAgent

public interface NHINDAgent

The NHINDAgent is the primary entity for applying cryptography and trust logic on incoming and outgoing messages. The main messaging system (such as an SMTP server, email client, or other message handling agent) instantiates an instance of the agent with configurable certificates storage implementations and trust anchor stores. The agent then applies S/MIME logic to the messages and asserts that the messages are being routed to and from trusted addresses.

The agent can support multiple local domains within one instance.

Author:
Greg Meyer, Umesh Madan

Method Summary
 Collection<String> getDomains()
          Gets the list of domains that the agent is serving.
 IncomingMessage processIncoming(IncomingMessage message)
          Processes a pre-enveloped message.
 IncomingMessage processIncoming(MessageEnvelope envelope)
          Processes a pre-enveloped message.
 IncomingMessage processIncoming(javax.mail.internet.MimeMessage msg)
          Processes an incoming mime message.
 IncomingMessage processIncoming(String messageText)
          Processes an incoming message represented by a raw string.
 IncomingMessage processIncoming(String messageText, NHINDAddressCollection recipients, NHINDAddress sender)
          Processes an incoming message represented by a raw string.
 OutgoingMessage processOutgoing(MessageEnvelope envelope)
          Processes an outgoing pre-enveloped message.
 OutgoingMessage processOutgoing(OutgoingMessage message)
          Processes an outgoing pre-enveloped message.
 OutgoingMessage processOutgoing(String messageText)
          Processes an outgoing message represented by a raw string.
 OutgoingMessage processOutgoing(String messageText, NHINDAddressCollection recipients, NHINDAddress sender)
          Processes an outgoing message represented by a raw string.
 

Method Detail

getDomains

Collection<String> getDomains()
Gets the list of domains that the agent is serving.

Returns:
The domains that the agent is serving.

processIncoming

IncomingMessage processIncoming(String messageText)
Processes an incoming message represented by a raw string. The message will be decrypted and validated that it meets trust assertions.

Parameters:
messageText - The raw contents of the incoming message that will be processed.
Returns:
An incoming messaging object that contains the unwrapped and decrypted message.

processIncoming

IncomingMessage processIncoming(String messageText,
                                NHINDAddressCollection recipients,
                                NHINDAddress sender)
Processes an incoming message represented by a raw string. The message will be decrypted and validated that it meets trust assertions.

Parameters:
messageText - The raw contents of the incoming message that will be processed.
recipients - The recipients of the message. This overrides the routing headers in the message.
sender - The sender of the message. This overrides the to FROM routing header in the message.
Returns:
An incoming messaging object that contains the unwrapped and decrypted message.

processIncoming

IncomingMessage processIncoming(MessageEnvelope envelope)
Processes a pre-enveloped message. The message will be decrypted and validated that it meets trust assertions.

Parameters:
envelope - A message envelope containing the incoming message.
Returns:
An incoming messaging object that contains the unwrapped and decrypted message.

processIncoming

IncomingMessage processIncoming(javax.mail.internet.MimeMessage msg)
Processes an incoming mime message. The message will be decrypted and validated that it meets trust assertions.

Parameters:
msg - The incoming mime message.
Returns:
An incoming messaging object that contains the unwrapped and decrypted message.

processIncoming

IncomingMessage processIncoming(IncomingMessage message)
Processes a pre-enveloped message. The message will be decrypted and validated that it meets trust assertions.

Parameters:
envelope - A message envelope containing the incoming message.
Returns:
An incoming messaging object that contains the unwrapped and decrypted message.

processOutgoing

OutgoingMessage processOutgoing(String messageText)
Processes an outgoing message represented by a raw string. The message will be wrapped, encrypted, and signed.

Parameters:
messageText - The raw contents of the incoming message that will be processed.
Returns:
An outoing messaging object that contains the wrapped message that is and encrypted and signed.

processOutgoing

OutgoingMessage processOutgoing(String messageText,
                                NHINDAddressCollection recipients,
                                NHINDAddress sender)
Processes an outgoing message represented by a raw string. The message will be wrapped, encrypted, and signed.

Parameters:
messageText - The raw contents of the incoming message that will be processed.
recipients - The recipients of the message. This overrides the routing headers in the message.
sender - The sender of the message. This overrides the to FROM routing header in the message.
Returns:
An outoing messaging object that contains the wrapped message that is and encrypted and signed.

processOutgoing

OutgoingMessage processOutgoing(MessageEnvelope envelope)
Processes an outgoing pre-enveloped message. The message will be wrapped, encrypted, and signed.

Parameters:
envelope - A message envelope containing the outgoing message.
Returns:
An outoing messaging object that contains the wrapped message that is and encrypted and signed.

processOutgoing

OutgoingMessage processOutgoing(OutgoingMessage message)
Processes an outgoing pre-enveloped message. The message will be wrapped, encrypted, and signed.

Parameters:
message - A message envelope containing the incoming message.
Returns:
An outoing messaging object that contains the wrapped message that is and encrypted and signed.


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