Interface GenericMessage
-
- All Superinterfaces:
Message
,RecordMessage
public interface GenericMessage extends RecordMessage
Interface for sending Generic messages, adding fields by name and value.
GenericMessage
behaves according to theRecordMessage
interface, so callingRecordMessage.getFields()
on aGenericMessage
returns an identical list of fields to a properly configured adapter using aRecordType1Message
.While GenericMessage behave similarly to RecordType1Message, it eliminates the need to provide field mappings in fields.conf. This may be useful when receiving updates from a provider which supplies a variable or unknown number of fields.
A new
GenericMessage
can be instantiated by callingMessageFactory.createGenericMessage(String)
(MessageFactory is is available viaPublisher.getMessageFactory()
).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isNoCache()
Gets whether this Generic message should be cached in the DataSource (both remote and local ).void
setNoCache(boolean noCache)
Sets whether this Generic message should be cached in the DataSource (both remote and local).-
Methods inherited from interface com.caplin.datasource.messaging.Message
getMessageType, getSubject, isImage, setImage
-
Methods inherited from interface com.caplin.datasource.messaging.record.RecordMessage
addLatencyChainPoint, clearFields, containsField, getField, getFields, removeField, setField, setInitialLatencyChainTime
-
-
-
-
Method Detail
-
isNoCache
boolean isNoCache()
Gets whether this Generic message should be cached in the DataSource (both remote and local ).
- Returns:
- true if this record should not be cached in the remote DataSource's cache, false if it should be cached.
-
setNoCache
void setNoCache(boolean noCache)
Sets whether this Generic message should be cached in the DataSource (both remote and local).
If you do not call this method then by default all
GenericMessage
s have the value of no cache set tofalse
.- Parameters:
noCache
- true if this record should not be cached in the remote DataSource's cache, false if it should be cached.
-
-