public class MultiMessagePayload extends Object implements IDataPayload
PAYLOAD_TYPE_HEADER, PAYLOAD_TYPE_JPG, PAYLOAD_TYPE_MULTI, PAYLOAD_TYPE_SMS, PAYLOAD_TYPE_TEXT, PAYLOAD_TYPE_XML| Constructor and Description |
|---|
MultiMessagePayload()
Note: Only useful for serialization.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
accept(IDataPayloadVisitor<T> visitor)
Visitor pattern accept method.
|
void |
addPayload(IDataPayload payload)
Adds a payload that should be sent as part of this
payload.
|
long |
getLength() |
String |
getPayloadId() |
List<IDataPayload> |
getPayloads() |
InputStream |
getPayloadStream()
Gets the stream for this payload.
|
int |
getPayloadType() |
int |
getTransportId() |
void |
readExternal(DataInputStream in,
PrototypeFactory pf) |
void |
writeExternal(DataOutputStream out) |
public MultiMessagePayload()
public void addPayload(IDataPayload payload)
payload - A payload that will be transmitted
after all previously added payloads.public List<IDataPayload> getPayloads()
public InputStream getPayloadStream() throws IOException
IDataPayloadgetPayloadStream in interface IDataPayloadIOExceptionpublic void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException
readExternal in interface ExternalizableIOExceptionDeserializationExceptionpublic void writeExternal(DataOutputStream out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic <T> T accept(IDataPayloadVisitor<T> visitor)
IDataPayloadaccept in interface IDataPayloadvisitor - The visitor to visit this payload.public String getPayloadId()
getPayloadId in interface IDataPayloadpublic int getPayloadType()
getPayloadType in interface IDataPayloadpublic int getTransportId()
getTransportId in interface IDataPayloadpublic long getLength()
getLength in interface IDataPayloadCopyright © 2021. All rights reserved.