public class WrappedMessage extends Object
| Constructor and Description |
|---|
WrappedMessage() |
| Modifier and Type | Method and Description |
|---|---|
static Message |
create(Message message,
String[] headersToCopy)
Wraps a messaging into a new message by creating a message wrapper, copying only desired headers into the wrapper, and pushing the entire
original message (including headers) into the body of the wrapper.
|
static Message |
create(String message,
String[] headersToCopy)
Wraps a messaging (represented in a raw string) into a new message by creating a message wrapper, copying only desired headers into the wrapper,
and pushing the entire original message (including headers) into the body of the wrapper.
|
static Message |
extract(Message message)
Extracts the wrapped message from the wrapper.
|
static boolean |
isWrapped(Message message)
Determines if a message is wrapped.
|
public static Message create(Message message, String[] headersToCopy) throws javax.mail.MessagingException
message - The message to wrap.headersToCopy - The headers that should be copied from the original message into the wrapper.javax.mail.MessagingExceptionpublic static Message create(String message, String[] headersToCopy) throws javax.mail.MessagingException
message - The message to wrap.headersToCopy - The headers that should be copied from the original message into the wrapper.javax.mail.MessagingExceptionpublic static boolean isWrapped(Message message)
message - The message to check.extract(Message)} operation.Copyright © 2010-2016 NHIN Direct. All Rights Reserved.