public interface MessageHandler
Registering a handler to receive subscription messages is done by invoking
the RT_Consumer.request(com.factset.rt.RT_Request, com.factset.rt.MessageHandler)
method. The API
invokes the onMessage(com.factset.rt.RT_Consumer.Subscription, com.factset.rt.RT_Message)
method when messages applicable to the
associated RT_Consumer.Subscription
are received from a DataFeed server.
onMessage
will only be invoked during a call to the
RT_Consumer.dispatch()
methods.
Subscription messages are real-time messages received from a DataFeed server.
RT_Consumer
,
RT_Message
Modifier and Type | Method and Description |
---|---|
void |
onMessage(RT_Consumer.Subscription sub,
RT_Message msg)
Invoked by an
RT_Consumer when a message has arrived for the
associated subscription. |
void onMessage(RT_Consumer.Subscription sub, RT_Message msg)
RT_Consumer
when a message has arrived for the
associated subscription.
To register this MessageHandler
for subscription
messages, invoke the RT_Consumer.request(com.factset.rt.RT_Request, com.factset.rt.MessageHandler)
method.
A dynamic subscription will deliver a series of messages, while a static subscription will close the stream after the initial response. The initial response will contain all available fields and subsequent updates will contain only those fields that have changed.
This method must not throw.
sub
- the RT_Consumer.Subscription
which uniquely
identifies the associated subscriptionmsg
- a message containing real-time data