R
- as RecipientTypeT
- as PayloadTypepublic class DisposableMessage<R,T> extends Object implements Message<R,T>
Modifier and Type | Field and Description |
---|---|
protected ContentType |
contentType |
protected String |
messageId |
protected T |
payload |
protected Priority |
priority |
protected List<R> |
recipients |
Constructor and Description |
---|
DisposableMessage() |
DisposableMessage(DisposableMessage t) |
DisposableMessage(T payload) |
DisposableMessage(T payload,
ContentType contentType) |
Modifier and Type | Method and Description |
---|---|
ContentType |
getContentType()
If used ensure
ContentType.getType() BaseType is filled. |
String |
getMessageId()
A representative Id that can link to the actual Message
|
T |
getPayload()
The actual message payload
|
Priority |
getPriority() |
List<R> |
getRecipients() |
void |
setContentType(ContentType contentType) |
void |
setMessageId(String messageId) |
void |
setPayload(T payload) |
void |
setPriority(Priority priority) |
void |
setRecipients(List<R> recipients)
One may further obtain the list by using
Reader like CSVMailAddressReader . |
protected T payload
protected ContentType contentType
protected String messageId
protected Priority priority
public DisposableMessage()
public DisposableMessage(DisposableMessage t)
public DisposableMessage(T payload)
public DisposableMessage(T payload, ContentType contentType)
public void setRecipients(List<R> recipients)
Reader
like CSVMailAddressReader
.
List emailAddresses = CSVMailAddressReader_Instance.read(new File(userAddressListCSVPath));
recipients
- public T getPayload()
Message
getPayload
in interface Message<R,T>
public void setPayload(T payload)
public ContentType getContentType()
Message
ContentType.getType()
BaseType is filled.getContentType
in interface Message<R,T>
ContentType
public void setContentType(ContentType contentType)
public String getMessageId()
Message
getMessageId
in interface Message<R,T>
public void setMessageId(String messageId)
public Priority getPriority()
getPriority
in interface Message<R,T>
Priority, {@link DefaultPriority}
public void setPriority(Priority priority)
Copyright © 2018. All rights reserved.