/** * Processes an incoming message represented by a raw string. The message will be decrypted and validated that it meets trust assertions. * @param messageText The raw contents of the incoming message that will be processed. * @return An incoming messaging object that contains the unwrapped and decrypted message. */ public IncomingMessage processIncoming(String messageText) { if (messageText == null || messageText.length() == 0) { throw new IllegalArgumentException(); } return processIncoming(new IncomingMessage(messageText)); }
/** * Processes a pre-enveloped message. The message will be decrypted and validated that it meets trust assertions. * @param envelope A message envelope containing the incoming message. * @return An incoming messaging object that contains the unwrapped and decrypted message. */ public IncomingMessage processIncoming(MessageEnvelope envelope) { if (envelope == null) { throw new IllegalArgumentException(); } this.checkEnvelopeAddresses(envelope); return this.processIncoming(new IncomingMessage(envelope)); }
/** * Processes an incoming message represented by a raw string. The message will be decrypted and validated that it meets trust assertions. * @param messageText The raw contents of the incoming message that will be processed. * @param recipients The recipients of the message. This overrides the routing headers in the message. * @param sender The sender of the message. This overrides the to FROM routing header in the message. * @return An incoming messaging object that contains the unwrapped and decrypted message. */ public IncomingMessage processIncoming(String messageText, NHINDAddressCollection recipients, NHINDAddress sender) { this.checkEnvelopeAddresses(recipients, sender); IncomingMessage message = new IncomingMessage(messageText, recipients, sender); return this.processIncoming(message); }
/** * Processes an incoming mime message. The message will be decrypted and validated that it meets trust assertions. * @param msg The incoming mime message. * @return An incoming messaging object that contains the unwrapped and decrypted message. */ public IncomingMessage processIncoming(MimeMessage msg) { if (msg == null) { throw new IllegalArgumentException(); } IncomingMessage inMsg = null; try { inMsg = new IncomingMessage(new Message(msg)); } catch (MessagingException e) { throw new MimeException(MimeError.InvalidMimeEntity, e); } return processIncoming(inMsg); }