Interface IDataPayload
- All Superinterfaces:
Externalizable
- All Known Implementing Classes:
ByteArrayPayload,DataPointerPayload,ModelReferencePayload,MultiMessagePayload
public interface IDataPayload extends Externalizable
IDataPayload is an interface that specifies a piece of data
that will be transmitted over the wire to
- Author:
- Clayton Sims
-
Field Summary
Fields Modifier and Type Field Description static intPAYLOAD_TYPE_HEADERstatic intPAYLOAD_TYPE_JPGstatic intPAYLOAD_TYPE_MULTIstatic intPAYLOAD_TYPE_SMSstatic intPAYLOAD_TYPE_TEXTData payload codesstatic intPAYLOAD_TYPE_XML -
Method Summary
Modifier and Type Method Description <T> Taccept(IDataPayloadVisitor<T> visitor)Visitor pattern accept method.longgetLength()StringgetPayloadId()InputStreamgetPayloadStream()Gets the stream for this payload.intgetPayloadType()intgetTransportId()Methods inherited from interface org.javarosa.core.util.externalizable.Externalizable
readExternal, writeExternal
-
Field Details
-
PAYLOAD_TYPE_TEXT
static final int PAYLOAD_TYPE_TEXTData payload codes- See Also:
- Constant Field Values
-
PAYLOAD_TYPE_XML
static final int PAYLOAD_TYPE_XML- See Also:
- Constant Field Values
-
PAYLOAD_TYPE_JPG
static final int PAYLOAD_TYPE_JPG- See Also:
- Constant Field Values
-
PAYLOAD_TYPE_HEADER
static final int PAYLOAD_TYPE_HEADER- See Also:
- Constant Field Values
-
PAYLOAD_TYPE_MULTI
static final int PAYLOAD_TYPE_MULTI- See Also:
- Constant Field Values
-
PAYLOAD_TYPE_SMS
static final int PAYLOAD_TYPE_SMS- See Also:
- Constant Field Values
-
-
Method Details
-
getPayloadStream
Gets the stream for this payload.- Returns:
- A stream for the data in this payload.
- Throws:
IOException
-
getPayloadId
String getPayloadId()- Returns:
- A string identifying the contents of the payload
-
getPayloadType
int getPayloadType()- Returns:
- The type of the data encapsulated by this payload.
-
accept
Visitor pattern accept method.- Parameters:
visitor- The visitor to visit this payload.
-
getLength
long getLength() -
getTransportId
int getTransportId()- Returns:
- A unique Id for the transport manager to use to be able to identify the status of transmissions related to this payload
-