dxFeed Graal Native SDK 3.16.0
Loading...
Searching...
No Matches
dxfg_subscription.h
Go to the documentation of this file.
1// Copyright (c) 2025 Devexperts LLC.
2// SPDX-License-Identifier: MPL-2.0
3
8
9#ifndef DXFG_SUBSCRIPTION_H
10#define DXFG_SUBSCRIPTION_H
11
12#ifdef __cplusplus
13extern "C" {
14# include <cstdint>
15#else
16# include <stdint.h>
17#endif
18
19#include "dxfg_common.h"
20
21#include "graal_isolate.h"
22#include "dxfg_events.h"
23#include "dxfg_javac.h"
24
52
54// Forward declarations: the types are described in dxfg_feed.h and dxfg_subscription_controller.h.
55typedef struct dxfg_feed_t dxfg_feed_t;
58
72
87
101
120typedef void (*dxfg_feed_event_listener_function)(graal_isolatethread_t *thread, dxfg_event_type_list *events, void *user_data);
121
137DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_new()")
139
155DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_newWithEventTypes()")
157
176DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_getSubscriptionController() (experimental)")
178
195DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_attach()")
197
213DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_detach()")
215
228DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_isClosed()")
230
252DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_close()")
254
267DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_getEventTypes()")
269
283DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_containsEventType()")
285
300DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_clear()")
302
318DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_getSymbols()")
320
337DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_getDecoratedSymbols()")
339
356DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_setSymbol()")
358
376DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_setSymbols()")
378
395DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_addSymbol()")
397
415DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_addSymbols()")
417
433DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_removeSymbol()")
435
452DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_removeSymbols()")
454
468DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_getExecutor()")
470
487DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_setExecutor()")
489
503DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_getAggregationPeriod()")
505
523DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_getAggregationPeriodMillis()")
525
546DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_setAggregationPeriod()")
548
567DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_setAggregationPeriodMillis()")
569
587DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_getAggregationPeriodInfo()")
589 DXFG_OUT int64_t *min, DXFG_OUT int64_t *max);
590
606DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_getTotalDroppedEvents() (experimental)")
608 DXFG_OUT int64_t *droppedEvents);
609
629DXFG_DEPRECATED("use dxfg_v4_DXFeedEventListener_new()")
631
650DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_addEventListener()")
652
670DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_removeEventListener()")
672
692DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_addChangeListener()")
694
711DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_removeChangeListener()")
713
729DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_getEventsBatchLimit()")
731
749DXFG_DEPRECATED("use dxfg_v4_DXFeedSubscription_setEventsBatchLimit()")
751 // end of Subscription
753
754#ifdef __cplusplus
755}
756#endif
757
758#endif // DXFG_SUBSCRIPTION_H
dxFeed Graal Native SDK Common declarations
dxFeed Graal Native SDK Events functions and types declarations
dxfg_event_clazz_t
The class of an event: tells which structure an event (dxfg_event_type_t) is.
Definition dxfg_events.h:185
dxFeed Graal Native SDK Java functions and types declarations
The functions of GraalVM that create, attach to and tear down an isolate, the instance of the SDK in ...
struct __graal_isolatethread_t graal_isolatethread_t
The state of one thread attached to an isolate: the first parameter (thread) of the SDK functions.
Definition graal_isolate.h:60
#define DXFG_OUT
Definition dxfg_common.h:37
void(*) dxfg_feed_event_listener_function(graal_isolatethread_t *thread, dxfg_event_type_list *events, void *user_data)
The function of a dxfg_feed_event_listener_t: called when events are received.
Definition dxfg_subscription.h:120
dxfg_subscription_t * dxfg_DXFeedSubscription_new2(graal_isolatethread_t *thread, dxfg_event_clazz_list_t *eventClazzes)
int32_t dxfg_DXFeedSubscription_attach(graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_feed_t *feed)
dxfg_executor_t * dxfg_DXFeedSubscription_getExecutor(graal_isolatethread_t *thread, dxfg_subscription_t *sub)
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_detach(graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_feed_t *feed)
int32_t dxfg_DXFeedSubscription_addEventListener(graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_feed_event_listener_t *listener)
int32_t dxfg_DXFeedSubscription_setExecutor(graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_executor_t *executor)
int32_t dxfg_DXFeedSubscription_clear(graal_isolatethread_t *thread, dxfg_subscription_t *sub)
int32_t dxfg_DXFeedSubscription_close(graal_isolatethread_t *thread, dxfg_subscription_t *sub)
int32_t dxfg_DXFeedSubscription_setAggregationPeriod(graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_time_period_t *period)
int32_t dxfg_DXFeedSubscription_removeSymbol(graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_symbol_t *symbol)
int32_t dxfg_DXFeedSubscription_setEventsBatchLimit(graal_isolatethread_t *thread, dxfg_subscription_t *sub, int32_t eventsBatchLimit)
int32_t dxfg_DXFeedSubscription_setSymbols(graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_symbol_list *symbols)
dxfg_symbol_list * dxfg_DXFeedSubscription_getDecoratedSymbols(graal_isolatethread_t *thread, dxfg_subscription_t *sub)
int32_t dxfg_DXFeedSubscription_getTotalDroppedEvents(graal_isolatethread_t *thread, dxfg_subscription_t *sub, DXFG_OUT int64_t *droppedEvents)
int32_t dxfg_DXFeedSubscription_getAggregationPeriodMillis(graal_isolatethread_t *thread, dxfg_subscription_t *sub, DXFG_OUT int64_t *aggregationPeriod)
int32_t dxfg_DXFeedSubscription_removeSymbols(graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_symbol_list *symbols)
dxfg_time_period_t * dxfg_DXFeedSubscription_getAggregationPeriod(graal_isolatethread_t *thread, dxfg_subscription_t *sub)
int32_t dxfg_DXFeedSubscription_removeChangeListener(graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_observable_subscription_change_listener_t *listener)
int32_t dxfg_DXFeedSubscription_getSubscriptionController(graal_isolatethread_t *thread, dxfg_subscription_t *sub, DXFG_OUT dxfg_subscription_controller_t **subscriptionController)
int32_t dxfg_DXFeedSubscription_setSymbol(graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_symbol_t *symbol)
int32_t dxfg_DXFeedSubscription_removeEventListener(graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_feed_event_listener_t *listener)
int32_t dxfg_DXFeedSubscription_getAggregationPeriodInfo(graal_isolatethread_t *thread, dxfg_subscription_t *sub, DXFG_OUT int64_t *min, DXFG_OUT int64_t *max)
int32_t dxfg_DXFeedSubscription_containsEventType(graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_event_clazz_t eventClazz)
int32_t dxfg_DXFeedSubscription_addChangeListener(graal_isolatethread_t *thread, dxfg_subscription_t *sub, dxfg_observable_subscription_change_listener_t *listener)
dxfg_event_clazz_list_t * dxfg_DXFeedSubscription_getEventTypes(graal_isolatethread_t *thread, dxfg_subscription_t *sub)
int32_t dxfg_DXFeedSubscription_getEventsBatchLimit(graal_isolatethread_t *thread, dxfg_subscription_t *sub)
int32_t dxfg_DXFeedSubscription_isClosed(graal_isolatethread_t *thread, dxfg_subscription_t *sub)
dxfg_subscription_t * dxfg_DXFeedSubscription_new(graal_isolatethread_t *thread, dxfg_event_clazz_t eventClazz)
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)
dxfg_symbol_list * dxfg_DXFeedSubscription_getSymbols(graal_isolatethread_t *thread, dxfg_subscription_t *sub)
A list of event classes.
Definition dxfg_events.h:1227
A list of events.
Definition dxfg_events.h:1215
A handle of a Java Executor object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_javac.h:126
A handle of a Java DXFeedEventListener object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_subscription.h:97
dxfg_java_object_handler handler
Definition dxfg_subscription.h:99
A handle of a Java DXFeed object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_feed.h:61
The handle of a Java object: the reference by which the C code refers to an object that lives in Java...
Definition dxfg_javac.h:60
A handle of a Java ObservableSubscriptionChangeListener object; release it with dxfg_JavaObjectHandle...
Definition dxfg_events.h:1440
A handle of a Java SubscriptionController object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_subscription_controller.h:54
A handle of a Java DXFeedSubscription object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_subscription.h:68
dxfg_java_object_handler handler
Definition dxfg_subscription.h:70
A list of symbols.
Definition dxfg_events.h:166
The base structure of every symbol: the first field of all the symbol structures.
Definition dxfg_events.h:89
A handle of a Java TimePeriod object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_javac.h:150
A handle of a Java DXFeedTimeSeriesSubscription object; release it with dxfg_JavaObjectHandler_releas...
Definition dxfg_subscription.h:83
dxfg_subscription_t sub
Definition dxfg_subscription.h:85