Interface GenericMessage
- All Superinterfaces:
Message,RecordMessage
GenericMessage behaves according to the
RecordMessage interface, so calling
RecordMessage.getFields() on a
GenericMessage returns an identical list of fields to a properly
configured adapter using a RecordType1Message.
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 calling
MessageFactory.createGenericMessage(String) (MessageFactory is is available
via Publisher.getMessageFactory()).
Note: After publishing a message, do not reuse the message (e.g. change the content, republish) as this can cause issues.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanGets whether this Generic message should be cached in the DataSource (both remote and local ).voidsetNoCache(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, setImageMethods inherited from interface com.caplin.datasource.messaging.record.RecordMessage
addLatencyChainPoint, clearFields, containsField, getField, getFields, removeField, setField, setInitialLatencyChainTime
-
Method Details
-
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
GenericMessages 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.
-