Class
caplin.chart.series

Request

The class is still an Alpha release. It should only be used for experimental development as substantial changes may occur.
Abstract class that represents a request that will be passed from a caplin.chart.Component to caplin.chart.Series which will in turn pass it to the caplin.chart-message-service.

The request object contains all the information the caplin.chart-message-service needs in order to request data from a backend system.

If you are using the Caplin Platform you will use caplin.chart.series.request.CaplinPlatform class as it has a Caplin Platform specific implementation that works with the default implementation of the caplin.chart-message-service service: caplin.chart.service.message.CaplinPlatform.

Constructor Summary

Attributes Name and Description
caplin.chart.series.Request()

Field Summary

Attributes Name and Description
<static> caplin.chart.series.Request.REQUEST_BOTH

Request both historic and realtime chart series data

<static> caplin.chart.series.Request.REQUEST_HISTORIC

Request historic chart series data.

<static> caplin.chart.series.Request.REQUEST_REALTIME

Request realtime chart series data.

Method Summary

Attributes Name and Description
<static> Object createFromSerializedState(Element A)

Creates a new instance of caplin.chart.series.Request based on the values in the serialized XML.

String getBegin()

Returns the Unix time-stamp that indicates for how far back historic data should be requested.

String getEnd()

Returns the Unix time-stamp that indicates the point in time up until which historic data should be requested.

String getId()

Returns the unique identifier for this request.

String getInstrument()

Returns the instrument that this request relates to.

String getInterval()

Returns the interval to be requested.

String getSerializedState()

Returns the serialized representation of the Request object, which can be later used to recreate the object (using caplin.chart.series.Request.createFromSerializedState)

String getSeriesType()

Returns the series type required for the request.

<static> Boolean isValidRequestType(String sRequestType)

Checks if sRequestType is valid.

Constructor Detail

caplin.chart.series.Request()

Field Detail

<static> caplin.chart.series.Request.REQUEST_BOTH

Request both historic and realtime chart series data

<static> caplin.chart.series.Request.REQUEST_HISTORIC

Request historic chart series data.

<static> caplin.chart.series.Request.REQUEST_REALTIME

Request realtime chart series data.

Method Detail

<static> Object createFromSerializedState(Element A)

Creates a new instance of caplin.chart.series.Request based on the values in the serialized XML.

Parameters
Element A XML element representing the state of the caplin.chart.series.Request object.
Returns
{Object} New instance of caplin.chart.series.Request

String getBegin()

Returns the Unix time-stamp that indicates for how far back historic data should be requested.

Returns
{String} The string representation of the time-stamp.

String getEnd()

Returns the Unix time-stamp that indicates the point in time up until which historic data should be requested.

Returns
{String} The string representation of the time-stamp.

String getId()

Returns the unique identifier for this request.

Returns
{String} The request id.

String getInstrument()

Returns the instrument that this request relates to.

Returns
{String} The instrument for this request.

String getInterval()

Returns the interval to be requested.

Returns
{String} The interval to be requested.

String getSerializedState()

Returns the serialized representation of the Request object, which can be later used to recreate the object (using caplin.chart.series.Request.createFromSerializedState)

Returns
{String} The XML representation of the object.

String getSeriesType()

Returns the series type required for the request.

Returns
{String} The series type.

<static> Boolean isValidRequestType(String sRequestType)

Checks if sRequestType is valid. Valid request type are:

- caplin.chart.series.Request.REQUEST_HISTORIC
- caplin.chart.series.Request.REQUEST_REALTIME
- caplin.chart.series.Request.REQUEST_BOTH

Parameters
String sRequestType The request type to check.
Returns
{Boolean} Returns true if the passed request type is valid, false otherwise.