public static interface RT_Consumer.Subscription
Subscription
instances are obtained by invoking the
RT_Consumer.request(com.factset.rt.RT_Request, com.factset.rt.MessageHandler)
method. Each instance represents a unique
subscription message stream.
Subscription
instances should be treated as a system
resource. Applications are responsible for canceling each subscription
when it is no longer needed. This can be done by calling the
cancel()
method or by disconnect the associated consumer with the
RT_Consumer.disconnect()
methods. The API will never cancel a
subscription, even if the incoming messages' isClosed
or
isError
methods return true
.
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels all future incoming messages for this subscription.
|
RT_Message |
getCachedMsg()
Returns a
RT_Message representing the current cached values for
all known fields for this Subscription . |
java.lang.String |
getRequestedSymbol()
Returns a
String representing the requested symbol
associated with this MemberSubscription . |
boolean |
isCancelled()
Returns
true if this subscription has been cancelled. |
boolean |
isPending()
Returns
true if the request for this
Subscription has been internally queued and has yet to
be sent to the DataFeed server. |
void cancel()
MessageHandler
associated with this
subscription will no longer receive messages. This method can be
invoked at any time.
If this subscription is already cancelled, then invoking this method has no effect.
boolean isPending()
true
if the request for this
Subscription
has been internally queued and has yet to
be sent to the DataFeed server.
This can happen if RT_Consumer.request(com.factset.rt.RT_Request, com.factset.rt.MessageHandler)
is invoked without a
connection to a DataFeed server or if the requested service is not
currently available.
After the first message for this subscription arrives, this method
will always return false
.
true
if this Subscription
is
pending; false
otherwiseboolean isCancelled()
true
if this subscription has been cancelled. A
subscription can only be cancelled by explicitly calling the
cancel()
method.
If this subscription has been cancelled, the registered
MessageHandler
will no longer receive messages.
true
if this Subscription
has been
cancelled; false
otherwisejava.lang.String getRequestedSymbol()
String
representing the requested symbol
associated with this MemberSubscription
.String
representing the requested symbol
associated with this MemberSubscription
.RT_Message getCachedMsg()
RT_Message
representing the current cached values for
all known fields for this Subscription
.RT_Message
representing the current cached values for
all known fields for this Subscription
.