dxFeed Graal Native SDK 3.9.0
Loading...
Searching...
No Matches
Subscription

Data Structures

struct  dxfg_subscription_t
struct  dxfg_time_series_subscription_t
struct  dxfg_feed_event_listener_t

Typedefs

typedef struct dxfg_feed_t dxfg_feed_t
 Forward declarations.
typedef struct dxfg_subscription_controller_t dxfg_subscription_controller_t
typedef struct dxfg_subscription_t dxfg_subscription_t
typedef struct dxfg_time_series_subscription_t dxfg_time_series_subscription_t
typedef struct dxfg_feed_event_listener_t dxfg_feed_event_listener_t
typedef void(*) dxfg_feed_event_listener_function(graal_isolatethread_t *thread, dxfg_event_type_list *events, void *user_data)

Functions

dxfg_subscription_t * dxfg_DXFeedSubscription_new (graal_isolatethread_t *thread, dxfg_event_clazz_t eventClazz)
dxfg_subscription_t * dxfg_DXFeedSubscription_new2 (graal_isolatethread_t *thread, dxfg_event_clazz_list_t *eventClazzes)
int32_t dxfg_DXFeedSubscription_getSubscriptionController (graal_isolatethread_t *thread, dxfg_subscription_t *sub, DXFG_OUT dxfg_subscription_controller_t **subscriptionController)
int32_t dxfg_DXFeedSubscription_attach (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_feed_t *feed)
int32_t dxfg_DXFeedSubscription_detach (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_feed_t *feed)
int32_t dxfg_DXFeedSubscription_isClosed (graal_isolatethread_t *thread, dxfg_subscription_t *sub)
int32_t dxfg_DXFeedSubscription_close (graal_isolatethread_t *thread, dxfg_subscription_t *sub)
dxfg_event_clazz_list_t * dxfg_DXFeedSubscription_getEventTypes (graal_isolatethread_t *thread, dxfg_subscription_t *sub)
int32_t dxfg_DXFeedSubscription_containsEventType (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_event_clazz_t eventClazz)
int32_t dxfg_DXFeedSubscription_clear (graal_isolatethread_t *thread, dxfg_subscription_t *sub)
dxfg_symbol_list * dxfg_DXFeedSubscription_getSymbols (graal_isolatethread_t *thread, dxfg_subscription_t *sub)
dxfg_symbol_list * dxfg_DXFeedSubscription_getDecoratedSymbols (graal_isolatethread_t *thread, dxfg_subscription_t *sub)
int32_t dxfg_DXFeedSubscription_setSymbol (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_symbol_t *symbol)
int32_t dxfg_DXFeedSubscription_setSymbols (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_symbol_list *symbols)
int32_t dxfg_DXFeedSubscription_addSymbol (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_symbol_t *symbol)
int32_t dxfg_DXFeedSubscription_addSymbols (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_symbol_list *symbols)
int32_t dxfg_DXFeedSubscription_removeSymbol (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_symbol_t *symbol)
int32_t dxfg_DXFeedSubscription_removeSymbols (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_symbol_list *symbols)
dxfg_executor_t * dxfg_DXFeedSubscription_getExecutor (graal_isolatethread_t *thread, dxfg_subscription_t *sub)
int32_t dxfg_DXFeedSubscription_setExecutor (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_executor_t *executor)
dxfg_time_period_t * dxfg_DXFeedSubscription_getAggregationPeriod (graal_isolatethread_t *thread, dxfg_subscription_t *sub)
int32_t dxfg_DXFeedSubscription_getAggregationPeriodMillis (graal_isolatethread_t *thread, dxfg_subscription_t *sub, DXFG_OUT int64_t *aggregationPeriod)
int32_t dxfg_DXFeedSubscription_setAggregationPeriod (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_time_period_t *period)
int32_t dxfg_DXFeedSubscription_setAggregationPeriodMillis (graal_isolatethread_t *thread, dxfg_subscription_t *sub, int64_t aggregationPeriod)
dxfg_feed_event_listener_t * dxfg_DXFeedEventListener_new (graal_isolatethread_t *thread, dxfg_feed_event_listener_function user_func, void *user_data)
int32_t dxfg_DXFeedSubscription_addEventListener (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_feed_event_listener_t *listener)
int32_t dxfg_DXFeedSubscription_removeEventListener (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_feed_event_listener_t *listener)
int32_t dxfg_DXFeedSubscription_addChangeListener (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_observable_subscription_change_listener_t *listener)
int32_t dxfg_DXFeedSubscription_removeChangeListener (graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_observable_subscription_change_listener_t *listener)
int32_t dxfg_DXFeedSubscription_getEventsBatchLimit (graal_isolatethread_t *thread, dxfg_subscription_t *sub)
int32_t dxfg_DXFeedSubscription_setEventsBatchLimit (graal_isolatethread_t *thread, dxfg_subscription_t *sub, int32_t eventsBatchLimit)

Detailed Description

Typedef Documentation

◆ dxfg_feed_event_listener_function

typedef void(*) dxfg_feed_event_listener_function(graal_isolatethread_t *thread, dxfg_event_type_list *events, void *user_data)

◆ dxfg_feed_event_listener_t

typedef struct dxfg_feed_event_listener_t dxfg_feed_event_listener_t

◆ dxfg_feed_t

typedef struct dxfg_feed_t dxfg_feed_t

Forward declarations.

◆ dxfg_subscription_controller_t

typedef struct dxfg_subscription_controller_t dxfg_subscription_controller_t

◆ dxfg_subscription_t

typedef struct dxfg_subscription_t dxfg_subscription_t

◆ dxfg_time_series_subscription_t

typedef struct dxfg_time_series_subscription_t dxfg_time_series_subscription_t

Function Documentation

◆ dxfg_DXFeedEventListener_new()

dxfg_feed_event_listener_t * dxfg_DXFeedEventListener_new ( graal_isolatethread_t * thread,
dxfg_feed_event_listener_function user_func,
void * user_data )

Creates a new event listener.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]user_funcThe function to call with the received events.
[in]user_dataThe user data to pass to the function.
Returns
The listener or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception. Releasing the last handle of the listener with dxfg_JavaObjectHandler_release() (or dxfg_NativeListener_deactivate()) stops the calls of the function: the user data can be freed after that.

◆ dxfg_DXFeedSubscription_addChangeListener()

int32_t dxfg_DXFeedSubscription_addChangeListener ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_observable_subscription_change_listener_t * listener )

◆ dxfg_DXFeedSubscription_addEventListener()

int32_t dxfg_DXFeedSubscription_addEventListener ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_feed_event_listener_t * listener )

Adds the event listener to the subscription. Add the listeners before the symbols: QD fails with IllegalStateException when a listener is added to an attached subscription that already has symbols.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subThe subscription.
[in]listenerThe listener.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on success or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

◆ dxfg_DXFeedSubscription_addSymbol()

int32_t dxfg_DXFeedSubscription_addSymbol ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_symbol_t * symbol )

◆ dxfg_DXFeedSubscription_addSymbols()

int32_t dxfg_DXFeedSubscription_addSymbols ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_symbol_list * symbols )

◆ dxfg_DXFeedSubscription_attach()

int32_t dxfg_DXFeedSubscription_attach ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_feed_t * feed )

◆ dxfg_DXFeedSubscription_clear()

int32_t dxfg_DXFeedSubscription_clear ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub )

◆ dxfg_DXFeedSubscription_close()

int32_t dxfg_DXFeedSubscription_close ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub )

◆ dxfg_DXFeedSubscription_containsEventType()

int32_t dxfg_DXFeedSubscription_containsEventType ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_event_clazz_t eventClazz )

◆ dxfg_DXFeedSubscription_detach()

int32_t dxfg_DXFeedSubscription_detach ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_feed_t * feed )

◆ dxfg_DXFeedSubscription_getAggregationPeriod()

dxfg_time_period_t * dxfg_DXFeedSubscription_getAggregationPeriod ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub )

◆ dxfg_DXFeedSubscription_getAggregationPeriodMillis()

int32_t dxfg_DXFeedSubscription_getAggregationPeriodMillis ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
DXFG_OUT int64_t * aggregationPeriod )

Returns the aggregation period (in millis) for data for this subscription instance.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subThe subscription handle.
[out]aggregationPeriodA pointer to the aggregation period.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.

◆ dxfg_DXFeedSubscription_getDecoratedSymbols()

dxfg_symbol_list * dxfg_DXFeedSubscription_getDecoratedSymbols ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub )

◆ dxfg_DXFeedSubscription_getEventsBatchLimit()

int32_t dxfg_DXFeedSubscription_getEventsBatchLimit ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub )

◆ dxfg_DXFeedSubscription_getEventTypes()

dxfg_event_clazz_list_t * dxfg_DXFeedSubscription_getEventTypes ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub )

◆ dxfg_DXFeedSubscription_getExecutor()

dxfg_executor_t * dxfg_DXFeedSubscription_getExecutor ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub )

◆ dxfg_DXFeedSubscription_getSubscriptionController()

int32_t dxfg_DXFeedSubscription_getSubscriptionController ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
DXFG_OUT dxfg_subscription_controller_t ** subscriptionController )

Returns the subscription controller for this subscription.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subThe subscription handle.
[out]subscriptionControllerThe pointer to the handle of the subscription controller of this subscription.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown. Use dxfg_JavaObjectHandler_release() to free the SubscriptionController handle.

◆ dxfg_DXFeedSubscription_getSymbols()

dxfg_symbol_list * dxfg_DXFeedSubscription_getSymbols ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub )

◆ dxfg_DXFeedSubscription_isClosed()

int32_t dxfg_DXFeedSubscription_isClosed ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub )

◆ dxfg_DXFeedSubscription_new()

dxfg_subscription_t * dxfg_DXFeedSubscription_new ( graal_isolatethread_t * thread,
dxfg_event_clazz_t eventClazz )

◆ dxfg_DXFeedSubscription_new2()

dxfg_subscription_t * dxfg_DXFeedSubscription_new2 ( graal_isolatethread_t * thread,
dxfg_event_clazz_list_t * eventClazzes )

◆ dxfg_DXFeedSubscription_removeChangeListener()

int32_t dxfg_DXFeedSubscription_removeChangeListener ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_observable_subscription_change_listener_t * listener )

◆ dxfg_DXFeedSubscription_removeEventListener()

int32_t dxfg_DXFeedSubscription_removeEventListener ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_feed_event_listener_t * listener )

Removes the event listener from the subscription.

The listener may still receive one more batch of events after this function (or dxfg_DXFeedSubscription_close()) returns. Release the listener (dxfg_JavaObjectHandler_release()) or deactivate it (dxfg_NativeListener_deactivate()) to be sure that its function is not called anymore.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subThe subscription.
[in]listenerThe listener.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on success or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

◆ dxfg_DXFeedSubscription_removeSymbol()

int32_t dxfg_DXFeedSubscription_removeSymbol ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_symbol_t * symbol )

◆ dxfg_DXFeedSubscription_removeSymbols()

int32_t dxfg_DXFeedSubscription_removeSymbols ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_symbol_list * symbols )

◆ dxfg_DXFeedSubscription_setAggregationPeriod()

int32_t dxfg_DXFeedSubscription_setAggregationPeriod ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_time_period_t * period )

◆ dxfg_DXFeedSubscription_setAggregationPeriodMillis()

int32_t dxfg_DXFeedSubscription_setAggregationPeriodMillis ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
int64_t aggregationPeriod )

Sets the aggregation period for data. This method sets a new aggregation period for data, which will only take effect on the next iteration of data notification. For example, if the current aggregation period is 5 seconds, and it is changed to 1 second, the next call to the next call to the retrieve method may take up to 5 seconds, after which the new aggregation period will take effect.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subThe subscription handle.
[in]aggregationPeriodThe aggregation period in millis.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.

◆ dxfg_DXFeedSubscription_setEventsBatchLimit()

int32_t dxfg_DXFeedSubscription_setEventsBatchLimit ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
int32_t eventsBatchLimit )

◆ dxfg_DXFeedSubscription_setExecutor()

int32_t dxfg_DXFeedSubscription_setExecutor ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_executor_t * executor )

◆ dxfg_DXFeedSubscription_setSymbol()

int32_t dxfg_DXFeedSubscription_setSymbol ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_symbol_t * symbol )

◆ dxfg_DXFeedSubscription_setSymbols()

int32_t dxfg_DXFeedSubscription_setSymbols ( graal_isolatethread_t * thread,
dxfg_subscription_t * sub,
dxfg_symbol_list * symbols )