Interface MappingMessage
- All Superinterfaces:
Message
Mapping messages allow a DataSource to inform the Liberator that it should request a different subject.
A MappingMessage is created with a subject and a mapping. When a request for subject is
received, the Liberator will request mapping. Updates for mapping will be routed transparently by the
Liberator to all peers originally requesting subject.
Mapping requests for /FX/GBPUSD/5 to /FX/GBPUSD/10:
Publisher publisher = dataSource.getPublisher();
MessageFactory messageFactory = publisher.getMessageFactory();
MappingMessage mappingMessage = messageFactory.createMappingMessage("/FX/GBPUSD/5",
"/FX/GBPUSD/10");
publisher.publishMappingMessage(mappingMessage);
-
Method Summary
Modifier and TypeMethodDescriptionGets the mapped-to subject for the message.Gets the subject of this message.booleanisImage()Gets a boolean value indicating whether thisMessagerepresents an image or an update.voidsetImage(boolean image) Sets a boolean value indicating whether thisMessagerepresents an image of the data or an update to it.Methods inherited from interface com.caplin.datasource.messaging.Message
getMessageType
-
Method Details
-
isImage
boolean isImage()Description copied from interface:MessageGets a boolean value indicating whether thisMessagerepresents an image or an update. By default, this method returnsfalseindicating that theMessageis an update and not an image. To change a message to be an image, callMessage.setImage(boolean)passing in the valuetrue. -
setImage
void setImage(boolean image) Description copied from interface:MessageSets a boolean value indicating whether thisMessagerepresents an image of the data or an update to it. By default, a newly createdMessageis deemed to be an update and not an image.Clients using Binary or JSON messages should not call this method as any messages of these types are handled as images. For these, this method is used internally only.
-
getSubject
String getSubject()Description copied from interface:MessageGets the subject of this message.- Specified by:
getSubjectin interfaceMessage- Returns:
- The subject.
-
getMapping
String getMapping()Gets the mapped-to subject for the message.- Returns:
- The mapped to subject.
-