public interface RecordType2Message extends RecordMessage
Interface for populating Type 2 Record messages, adding fields by field name.
Type 2 data represents market depth, and an instance of an RecordType2Message
represents a market maker or level with an order book. Note that a Record with a given Subject
can contain Type 1, Type 2 and Type 3 data. For an illustration of how Type 2 data is structured
see the document DataSource Overview.
To construct a RecordType2Message
use the
MessageFactory
obtained from the
Publisher
interface; objects implementing
RecordType2Message
cannot be instantiated directly.
The example below demonstrates sending a Type2 Record update.
import com.caplin.datasource.messaging.record.RecordType2Message;
import com.caplin.datasource.publisher.Publisher;
public class SendingARecordType2Update
{
void sendRecordType2Update(Publisher publisher, String subject)
{
// Create a Type 2 record message.
RecordType2Message message = publisher.getMessageFactory().createRecordType2Message(
subject,
"MarketMakerIndexField",
"MarketMaker");
// Add a Bid and Ask field
message.setField("Bid", "22.0");
message.setField("Ask", "22,1");
// Send the message to subscribed peers.
publisher.publishToSubscribedPeers(message);
}
}
Modifier and Type | Method and Description |
---|---|
boolean |
getDeleteEntryFlag()
Gets a value indicating whether this Type2 index should be deleted.
|
java.lang.String |
getType2Index()
Retrieves the Type2 index value.
|
java.lang.String |
getType2IndexField()
Retrieves the fieldname that is used for the Type2 index.
|
void |
setDeleteEntryFlag(java.lang.Boolean deleteEntryFlag)
Sets a value indicating whether this Type2 index should be deleted.
|
addLatencyChainPoint, clearFields, containsField, getField, getFields, removeField, setField, setInitialLatencyChainTime
getSubject, isImage, setImage
java.lang.String getType2IndexField()
java.lang.String getType2Index()
boolean getDeleteEntryFlag()
True
if the Type2 index should be deleted; otherwise false
.void setDeleteEntryFlag(java.lang.Boolean deleteEntryFlag)
deleteEntryFlag
- True
if the Type2 index should be deleted; otherwise false
.Please send bug reports and comments to Caplin support