dxFeed Graal Native SDK 3.16.0
Loading...
Searching...
No Matches
dxfg_feed.h File Reference

dxFeed Graal Native SDK Feed functions and types declarations More...

#include <stdint.h>
#include "dxfg_common.h"
#include "dxfg_events.h"
#include "dxfg_catch_exception.h"
#include "dxfg_javac.h"
#include "graal_isolate.h"

Go to the source code of this file.

Data Structures

struct  dxfg_feed_t
 A handle of a Java DXFeed object; release it with dxfg_JavaObjectHandler_release(). More...
struct  dxfg_promise_t
 A handle of a Java Promise object; release it with dxfg_JavaObjectHandler_release(). More...
struct  dxfg_promise_list
 A list of promise handles. More...
struct  dxfg_promise_events_t
 A handle of a Java Promise object whose result is a list of events; release it with dxfg_JavaObjectHandler_release(). More...
struct  dxfg_promise_event_t
 A handle of a Java Promise object whose result is an event; release it with dxfg_JavaObjectHandler_release(). More...

Macros

#define DXFG_PROMISE_AWAIT_TIMED_OUT   ((int32_t)1)
 The result of dxfg_Promise_awaitWithoutException() when the wait timed out (the promise is cancelled then).

Typedefs

typedef struct dxfg_feed_t dxfg_feed_t
 A handle of a Java DXFeed object; release it with dxfg_JavaObjectHandler_release().
typedef struct dxfg_promise_t dxfg_promise_t
 A handle of a Java Promise object; release it with dxfg_JavaObjectHandler_release().
typedef struct dxfg_promise_list dxfg_promise_list
 A list of promise handles.
typedef struct dxfg_promise_events_t dxfg_promise_events_t
 A handle of a Java Promise object whose result is a list of events; release it with dxfg_JavaObjectHandler_release().
typedef struct dxfg_promise_event_t dxfg_promise_event_t
 A handle of a Java Promise object whose result is an event; release it with dxfg_JavaObjectHandler_release().
typedef void(*) dxfg_promise_handler_function(graal_isolatethread_t *thread, dxfg_promise_t *promise, void *user_data)
 The function that is called when a promise is done.

Functions

dxfg_feed_t * dxfg_DXFeed_getInstance (graal_isolatethread_t *thread)
 Returns the feed of the default endpoint of the process.
dxfg_subscription_t * dxfg_DXFeed_createSubscription (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_event_clazz_t eventClazz)
 Creates a subscription for the events of one class and attaches it to the feed.
dxfg_subscription_t * dxfg_DXFeed_createSubscription2 (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_event_clazz_list_t *eventClazzes)
 Creates a subscription for the events of several classes and attaches it to the feed.
dxfg_time_series_subscription_t * dxfg_DXFeed_createTimeSeriesSubscription (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_event_clazz_t eventClazz)
 Creates a time series subscription for the events of one class and attaches it to the feed.
dxfg_time_series_subscription_t * dxfg_DXFeed_createTimeSeriesSubscription2 (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_event_clazz_list_t *eventClazzes)
 Creates a time series subscription for the events of several classes and attaches it to the feed.
int32_t dxfg_DXFeed_attachSubscription (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_subscription_t *sub)
 Attaches the subscription to the feed.
int32_t dxfg_DXFeed_detachSubscription (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_subscription_t *sub)
 Detaches the subscription from the feed.
int32_t dxfg_DXFeed_detachSubscriptionAndClear (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_subscription_t *sub)
 Detaches the subscription from the feed and clears the data that was delivered to the subscription.
dxfg_event_type_t * dxfg_DXFeed_getLastEventIfSubscribed (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_event_clazz_t eventClazz, dxfg_symbol_t *symbol)
 Returns the last event for the event class and symbol if there is a subscription for them.
dxfg_event_type_list * dxfg_DXFeed_getIndexedEventsIfSubscribed (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_event_clazz_t eventClazz, dxfg_symbol_t *symbol, const char *source)
 Returns the indexed events for the event class, symbol and source if there is a subscription for them.
dxfg_event_type_list * dxfg_DXFeed_getTimeSeriesIfSubscribed (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_event_clazz_t eventClazz, dxfg_symbol_t *symbol, int64_t from_time, int64_t to_time)
 Returns the time series events for the event class, symbol and time range if there is a subscription for them.
int32_t dxfg_DXFeed_getLastEvent (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_event_type_t *event)
 Fills the given event with the last event for its type and symbol.
int32_t dxfg_DXFeed_getLastEvents (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_event_type_list *events)
 The bulk version of dxfg_DXFeed_getLastEvent(): fills every event of the list.
int32_t dxfg_DXFeed_getLastEvent2 (graal_isolatethread_t *thread, dxfg_feed_t *feed, const dxfg_event_type_t *event, DXFG_OUT dxfg_event_type_t **lastEvent)
 Gets the last event for the type and symbol of the given event.
int32_t dxfg_DXFeed_getLastEvents2 (graal_isolatethread_t *thread, dxfg_feed_t *feed, const dxfg_event_type_list *events, DXFG_OUT dxfg_event_type_list **lastEvents)
 The bulk version of dxfg_DXFeed_getLastEvent2(): gets a new list with the last event for every event of the given list, in the same order.
dxfg_promise_event_t * dxfg_DXFeed_getLastEventPromise (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_event_clazz_t eventClazz, dxfg_symbol_t *symbol)
 Requests the last event for the event class and symbol and returns the promise of the result.
dxfg_promise_list * dxfg_DXFeed_getLastEventsPromises (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_event_clazz_t eventClazz, dxfg_symbol_list *symbols)
 The bulk version of dxfg_DXFeed_getLastEventPromise(): requests the last events for one event class and several symbols.
dxfg_promise_events_t * dxfg_DXFeed_getIndexedEventsPromise (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_event_clazz_t eventClazz, dxfg_symbol_t *symbol, dxfg_indexed_event_source_t *source)
 Requests the indexed events for the event class, symbol and source and returns the promise of the result.
dxfg_promise_events_t * dxfg_DXFeed_getTimeSeriesPromise (graal_isolatethread_t *thread, dxfg_feed_t *feed, dxfg_event_clazz_t clazz, dxfg_symbol_t *symbol, int64_t fromTime, int64_t toTime)
 Requests the time series events for the event class, symbol and time range and returns the promise of the result.
int32_t dxfg_DXFeedTimeSeriesSubscription_setFromTime (graal_isolatethread_t *thread, dxfg_time_series_subscription_t *sub, int64_t fromTime)
 Sets the earliest time from which the time series subscription receives the events.
int32_t dxfg_Promise_isDone (graal_isolatethread_t *thread, dxfg_promise_t *promise)
 Tells whether the promise is done: completed with a result, completed exceptionally or cancelled.
int32_t dxfg_Promise_hasResult (graal_isolatethread_t *thread, dxfg_promise_t *promise)
 Tells whether the promise has completed normally, with a result.
int32_t dxfg_Promise_hasException (graal_isolatethread_t *thread, dxfg_promise_t *promise)
 Tells whether the promise has completed exceptionally or was cancelled.
int32_t dxfg_Promise_isCancelled (graal_isolatethread_t *thread, dxfg_promise_t *promise)
 Tells whether the promise was cancelled.
dxfg_event_type_t * dxfg_Promise_EventType_getResult (graal_isolatethread_t *thread, dxfg_promise_event_t *promise)
 Returns the result of a promise of an event.
dxfg_event_type_list * dxfg_Promise_List_EventType_getResult (graal_isolatethread_t *thread, dxfg_promise_events_t *promise)
 Returns the result of a promise of a list of events.
dxfg_exception_t * dxfg_Promise_getException (graal_isolatethread_t *thread, dxfg_promise_t *promise)
 Returns the exception of the promise.
int32_t dxfg_Promise_await (graal_isolatethread_t *thread, dxfg_promise_t *promise)
 Waits for the promise to complete.
int32_t dxfg_Promise_await2 (graal_isolatethread_t *thread, dxfg_promise_t *promise, int32_t timeoutInMilliseconds)
 Waits for the promise to complete or the timeout to elapse.
int32_t dxfg_Promise_awaitWithoutException (graal_isolatethread_t *thread, dxfg_promise_t *promise, int32_t timeoutInMilliseconds)
 Waits for the promise to complete or the timeout to elapse, and reports the timeout without an exception.
int32_t dxfg_Promise_cancel (graal_isolatethread_t *thread, dxfg_promise_t *promise)
 Cancels the promise.
int32_t dxfg_Promise_List_EventType_complete (graal_isolatethread_t *thread, dxfg_promise_t *promise, dxfg_event_type_list *events)
 Completes the promise of a list of events normally, with the given list.
int32_t dxfg_Promise_EventType_complete (graal_isolatethread_t *thread, dxfg_promise_t *promise, dxfg_event_type_t *event)
 Completes the promise of an event normally, with the given event.
int32_t dxfg_Promise_completeExceptionally (graal_isolatethread_t *thread, dxfg_promise_t *promise, dxfg_exception_t *exception)
 Completes the promise exceptionally, with the given exception.
int32_t dxfg_Promise_whenDone (graal_isolatethread_t *thread, dxfg_promise_t *promise, dxfg_promise_handler_function promise_handler_function, void *user_data)
 Adds a handler that is called when the promise is done.
int32_t dxfg_Promise_whenDoneAsync (graal_isolatethread_t *thread, dxfg_promise_t *promise, dxfg_promise_handler_function promise_handler_function, void *user_data, dxfg_executor_t *executor)
 Adds a handler that is called by the given executor when the promise is done.
dxfg_promise_t * dxfg_Promise_completed (graal_isolatethread_t *thread, dxfg_promise_t *promise, dxfg_java_object_handler *handler)
 Creates a promise that is already completed normally, with the given Java object as the result.
dxfg_promise_t * dxfg_Promise_failed (graal_isolatethread_t *thread, dxfg_promise_t *promise, dxfg_exception_t *exception)
 Creates a promise that is already failed, with the given exception.
dxfg_promise_t * dxfg_Promises_allOf (graal_isolatethread_t *thread, dxfg_promise_list *promises)
 Creates a promise that is done when all the given promises are done.

Detailed Description

dxFeed Graal Native SDK Feed functions and types declarations