public final class RT_Request
extends java.lang.Object
This class specifies several request parameters, such as a service and key.
It is used to request a real-time subscription from a DataFeed server by
passing an instance to the RT_Consumer.request(com.factset.rt.RT_Request, com.factset.rt.MessageHandler)
method.
Constructor and Description |
---|
RT_Request(java.lang.String service,
java.lang.String key)
Constructs an
RT_Request with the given service and key. |
RT_Request(java.lang.String service,
java.lang.String key,
boolean snapshot)
Constructs an
RT_Request with the given service, key and
snapshot state. |
RT_Request(java.lang.String service,
java.lang.String key,
boolean snapshot,
java.lang.String authToken)
Constructs an
RT_Request with the given service, key,
snapshot state and options. |
RT_Request(java.lang.String service,
java.lang.String key,
boolean snapshot,
java.lang.String authToken,
java.lang.String options)
Constructs an
RT_Request with the given service, key,
snapshot state, options and authorization string. |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.String> |
decodeKey(java.lang.String key) |
static java.lang.String |
encodeKey(java.util.List<java.lang.String> keys) |
java.lang.String |
getAuthToken()
Returns the authorization token of this request.
|
java.lang.String |
getKey()
Returns the key of this request.
|
java.lang.String |
getOptions()
Returns the options of this request.
|
java.lang.String |
getService()
Returns the DataFeed service identifier of this request.
|
boolean |
isExtendedRequest()
Returns
true if this is a request with extended key field. |
boolean |
isSnapshot()
Returns
true if this is a snapshot request. |
static java.lang.String |
modifiedKey(java.lang.String key) |
void |
setOptions(java.lang.String opts)
Sets the options for this request.
|
java.util.List<RT_Request> |
split() |
java.lang.String |
toString()
Returns a brief description of this request.
|
public RT_Request(java.lang.String service, java.lang.String key)
RT_Request
with the given service and key.service
- a DataFeed service identifierkey
- a string that identifies the specific subject being requestedjava.lang.NullPointerException
- if service
or key
is nullpublic RT_Request(java.lang.String service, java.lang.String key, boolean snapshot)
RT_Request
with the given service, key and
snapshot state.service
- a DataFeed service identifierkey
- a string that identifies the specific subject being requestedsnapshot
- if true
, this is a snapshot requestjava.lang.NullPointerException
- if service
or key
is nullpublic RT_Request(java.lang.String service, java.lang.String key, boolean snapshot, java.lang.String authToken)
RT_Request
with the given service, key,
snapshot state and options.service
- a DataFeed service identifierkey
- a string that identifies the specific subject being requestedsnapshot
- if true
, this is a snapshot requestauthToken
- a string containing authorization informationjava.lang.NullPointerException
- if service
, key
or authToken
is nullpublic RT_Request(java.lang.String service, java.lang.String key, boolean snapshot, java.lang.String authToken, java.lang.String options)
RT_Request
with the given service, key,
snapshot state, options and authorization string.service
- a DataFeed service identifierkey
- a string that identifies the specific subject being requestedsnapshot
- if true
, this is a snapshot requestauthToken
- a string containing authorization informationoptions
- options to pass to the DataFeed serverjava.lang.NullPointerException
- if service
, key
,
authToken
or options
is nullpublic java.lang.String getService()
public java.lang.String getKey()
A key identifies the specific subject being requested. It is typically the symbol of the requested security.
public java.lang.String getOptions()
This parameter is not currently read by the DataFeed server and is reserved for future use.
public void setOptions(java.lang.String opts)
This parameter is not currently read by the DataFeed server and is reserved for future use.
public java.lang.String getAuthToken()
This parameter is not currently read by the DataFeed server and is reserved for future use.
public boolean isSnapshot()
true
if this is a snapshot request.true
if this is a snapshot request;
false
otherwisepublic java.lang.String toString()
toString
in class java.lang.Object
public boolean isExtendedRequest()
true
if this is a request with extended key field.true
if this is a request with extended key field;
false
otherwise.public static java.util.List<java.lang.String> decodeKey(java.lang.String key)
public static java.lang.String encodeKey(java.util.List<java.lang.String> keys)
public static java.lang.String modifiedKey(java.lang.String key)
public java.util.List<RT_Request> split()