dxFeed Graal Native SDK 3.14.0-rc2
Loading...
Searching...
No Matches
dxfg_endpoint.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_ENDPOINT_H
10#define DXFG_ENDPOINT_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_javac.h"
23
44
49typedef struct dxfg_feed_t dxfg_feed_t;
50
54
58
72
85
100
134
158
176 dxfg_endpoint_state_t new_state, void *user_data);
177
188
202DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_newBuilder()")
204
220DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_Builder_withRole()")
222
240DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_Builder_withName()")
242
261DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_Builder_withProperty()")
262int32_t dxfg_DXEndpoint_Builder_withProperty(graal_isolatethread_t *thread, dxfg_endpoint_builder_t *builder, const char *key, const char *value);
263
281DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_Builder_withProperties()")
283
305DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_Builder_withExecutor()")
307
323DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_Builder_supportsProperty()")
325
343DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_Builder_build()")
345 // end of Builder
347
365DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_getInstance()")
367
384DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_getInstanceWithRole()")
386
399DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_create()")
401
415DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_createWithRole()")
417
437DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_close()")
439
459DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_closeAndAwaitTermination()")
461
474DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_getRole()")
476
493DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_user()")
494int32_t dxfg_DXEndpoint_user(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint, const char *user);
495
512DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_password()")
513int32_t dxfg_DXEndpoint_password(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint, const char *password);
514
539DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_connect()")
540int32_t dxfg_DXEndpoint_connect(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint, const char *address);
541
562DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_reconnect()")
564
581DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_disconnect()")
583
600DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_disconnectAndClear()")
602
622DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_awaitProcessed()")
624
646DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_awaitNotConnected()")
648
661DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_getState()")
663
685DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_addStateChangeListener()")
687
705DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_removeStateChangeListener()")
707
723DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_getFeed()")
725
741DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_getPublisher()")
743
767DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_Builder_withExecutor()")
769
785DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_getEventTypes()")
787
802DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_getRequestedAggregationPeriod()")
805
820DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_getRequestedAggregationPeriodMillis()")
822 DXFG_OUT int64_t *period);
823
844DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_setRequestedAggregationPeriod()")
846 dxfg_time_period_t *period);
847
866DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_setRequestedAggregationPeriodMillis()")
868 int64_t period);
869
887DXFG_DEPRECATED("use dxfg_v4_DXEndpoint_getAggregationPeriodInfo()")
889 DXFG_OUT int64_t *min, DXFG_OUT int64_t *max);
890
913DXFG_DEPRECATED("use dxfg_v4_PropertyChangeListener_new()")
915 // end of Endpoint
917
918#ifdef __cplusplus
919}
920#endif
921
922#endif // DXFG_ENDPOINT_H
dxFeed Graal Native SDK Common declarations
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
dxfg_endpoint_builder_t * dxfg_DXEndpoint_newBuilder(graal_isolatethread_t *thread)
Creates a new endpoint builder.
int32_t dxfg_DXEndpoint_Builder_withRole(graal_isolatethread_t *thread, dxfg_endpoint_builder_t *builder, dxfg_endpoint_role_t role)
Sets the role of the endpoints built by the builder.
int32_t dxfg_DXEndpoint_Builder_withName(graal_isolatethread_t *thread, dxfg_endpoint_builder_t *builder, const char *name)
Sets the name of the endpoints built by the builder.
int32_t dxfg_DXEndpoint_Builder_withProperty(graal_isolatethread_t *thread, dxfg_endpoint_builder_t *builder, const char *key, const char *value)
Sets a property of the endpoints built by the builder.
int32_t dxfg_DXEndpoint_Builder_withProperties(graal_isolatethread_t *thread, dxfg_endpoint_builder_t *builder, const char *file_path)
Sets the properties of the endpoints built by the builder from a properties file.
dxfg_endpoint_t * dxfg_DXEndpoint_Builder_build(graal_isolatethread_t *thread, dxfg_endpoint_builder_t *builder)
Builds a new endpoint with the builder's settings.
int32_t dxfg_DXEndpoint_Builder_withExecutor(graal_isolatethread_t *thread, dxfg_endpoint_builder_t *builder, dxfg_executor_t *executor)
Sets the executor of the notifications of the endpoints built by this builder: event processing,...
int32_t dxfg_DXEndpoint_Builder_supportsProperty(graal_isolatethread_t *thread, dxfg_endpoint_builder_t *builder, const char *key)
Checks whether the builder supports a property.
#define DXFG_OUT
Definition dxfg_common.h:37
int32_t dxfg_DXEndpoint_connect(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint, const char *address)
Connects the endpoint to the remote address.
dxfg_endpoint_t * dxfg_DXEndpoint_create(graal_isolatethread_t *thread)
Creates a new endpoint with the DXFG_ENDPOINT_ROLE_FEED role.
dxfg_endpoint_state_t dxfg_DXEndpoint_getState(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint)
Returns the state of the endpoint.
int32_t dxfg_DXEndpoint_removeStateChangeListener(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint, dxfg_endpoint_state_change_listener_t *listener)
Removes the state change listener that was added with dxfg_DXEndpoint_addStateChangeListener().
int32_t dxfg_DXEndpoint_executor(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint, dxfg_executor_t *executor)
Changes the executor of the endpoint's notifications.
dxfg_publisher_t * dxfg_DXEndpoint_getPublisher(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint)
Returns the publisher of the endpoint.
int32_t dxfg_DXEndpoint_reconnect(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint)
Terminates all the network connections of the endpoint and initiates connecting again with the same a...
dxfg_endpoint_role_t dxfg_DXEndpoint_getRole(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint)
Returns the role of the endpoint.
int32_t dxfg_DXEndpoint_close(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint)
Closes the endpoint: disconnects it and releases its resources. The endpoint cannot be used after tha...
int32_t dxfg_DXEndpoint_disconnectAndClear(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint)
Terminates all the remote network connections of the endpoint and clears the stored data.
int32_t dxfg_DXEndpoint_setRequestedAggregationPeriodMillis(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint, int64_t period)
Sets the aggregation period (in millis) that the endpoint requests from the server.
int32_t dxfg_DXEndpoint_getAggregationPeriodInfo(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint, DXFG_OUT int64_t *min, DXFG_OUT int64_t *max)
Returns the aggregation period that the servers apply, over all connections of the endpoint.
int32_t dxfg_DXEndpoint_addStateChangeListener(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint, dxfg_endpoint_state_change_listener_t *listener)
Adds the state change listener (see dxfg_PropertyChangeListener_new()).
int32_t dxfg_DXEndpoint_closeAndAwaitTermination(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint)
Closes the endpoint and waits until all the data processing and the scheduled notifications are compl...
int32_t dxfg_DXEndpoint_awaitProcessed(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint)
Waits until the endpoint stops processing data (becomes quiescent).
dxfg_endpoint_t * dxfg_DXEndpoint_getInstance(graal_isolatethread_t *thread)
Returns the default application-wide singleton endpoint with the DXFG_ENDPOINT_ROLE_FEED role,...
dxfg_endpoint_state_change_listener_t * dxfg_PropertyChangeListener_new(graal_isolatethread_t *thread, dxfg_endpoint_state_change_listener_func user_func, void *user_data)
Creates a new endpoint state change listener.
int32_t dxfg_DXEndpoint_getRequestedAggregationPeriod(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint, DXFG_OUT dxfg_time_period_t **period)
Returns the aggregation period that the endpoint requests from the server.
int32_t dxfg_DXEndpoint_user(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint, const char *user)
Sets the user name of the endpoint.
void(*) dxfg_endpoint_state_change_listener_func(graal_isolatethread_t *thread, dxfg_endpoint_state_t old_state, dxfg_endpoint_state_t new_state, void *user_data)
The function of a dxfg_endpoint_state_change_listener_t: called when the state of the endpoint change...
Definition dxfg_endpoint.h:175
int32_t dxfg_DXEndpoint_setRequestedAggregationPeriod(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint, dxfg_time_period_t *period)
Sets the aggregation period that the endpoint requests from the server.
int32_t dxfg_DXEndpoint_awaitNotConnected(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint)
Waits until the state of the endpoint becomes DXFG_ENDPOINT_STATE_NOT_CONNECTED or DXFG_ENDPOINT_STAT...
dxfg_endpoint_t * dxfg_DXEndpoint_create2(graal_isolatethread_t *thread, dxfg_endpoint_role_t role)
Creates a new endpoint with the given role.
dxfg_feed_t * dxfg_DXEndpoint_getFeed(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint)
Returns the feed of the endpoint.
dxfg_endpoint_state_t
The state of an endpoint, see dxfg_DXEndpoint_getState().
Definition dxfg_endpoint.h:147
int32_t dxfg_DXEndpoint_disconnect(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint)
Terminates all the remote network connections of the endpoint.
dxfg_endpoint_t * dxfg_DXEndpoint_getInstance2(graal_isolatethread_t *thread, dxfg_endpoint_role_t role)
Creates a new endpoint with the given role on every call, the same as dxfg_DXEndpoint_create2().
dxfg_endpoint_role_t
The role of an endpoint: it is specified when the endpoint is created and cannot be changed afterward...
Definition dxfg_endpoint.h:111
dxfg_event_clazz_list_t * dxfg_DXEndpoint_getEventTypes(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint)
Returns the event types that the endpoint supports.
int32_t dxfg_DXEndpoint_password(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint, const char *password)
Sets the password of the endpoint.
int32_t dxfg_DXEndpoint_getRequestedAggregationPeriodMillis(graal_isolatethread_t *thread, dxfg_endpoint_t *endpoint, DXFG_OUT int64_t *period)
Returns the aggregation period (in millis) that the endpoint requests from the server.
@ DXFG_ENDPOINT_STATE_NOT_CONNECTED
Definition dxfg_endpoint.h:150
@ DXFG_ENDPOINT_STATE_CLOSED
Definition dxfg_endpoint.h:156
@ DXFG_ENDPOINT_STATE_CONNECTED
Definition dxfg_endpoint.h:154
@ DXFG_ENDPOINT_STATE_CONNECTING
Definition dxfg_endpoint.h:152
@ DXFG_ENDPOINT_ROLE_FEED
Definition dxfg_endpoint.h:114
@ DXFG_ENDPOINT_ROLE_STREAM_FEED
Definition dxfg_endpoint.h:122
@ DXFG_ENDPOINT_ROLE_PUBLISHER
Definition dxfg_endpoint.h:126
@ DXFG_ENDPOINT_ROLE_STREAM_PUBLISHER
Definition dxfg_endpoint.h:129
@ DXFG_ENDPOINT_ROLE_LOCAL_HUB
Definition dxfg_endpoint.h:132
@ DXFG_ENDPOINT_ROLE_ON_DEMAND_FEED
Definition dxfg_endpoint.h:118
A handle of a Java DXEndpoint.Builder object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_endpoint.h:81
dxfg_java_object_handler handler
Definition dxfg_endpoint.h:83
A handle of a Java PropertyChangeListener object that reports the state changes of an endpoint; relea...
Definition dxfg_endpoint.h:96
dxfg_java_object_handler handler
Definition dxfg_endpoint.h:98
A handle of a Java DXEndpoint object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_endpoint.h:68
dxfg_java_object_handler handler
Definition dxfg_endpoint.h:70
A list of event classes.
Definition dxfg_events.h:1227
A handle of a Java Executor object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_javac.h:126
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 DXPublisher object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_publisher.h:54
A handle of a Java TimePeriod object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_javac.h:150