dxFeed Graal CXX API
Loading...
Searching...
No Matches
api.hpp
1// Copyright (c) 2024 Devexperts LLC.
2// SPDX-License-Identifier: MPL-2.0
3
4#pragma once
5
6#include "internal/Conf.hpp"
7
9
10#include "internal/CEntryPointErrors.hpp"
11#include "internal/Common.hpp"
12#include "internal/Enum.hpp"
13#include "internal/EventClassList.hpp"
14#include "internal/Id.hpp"
15#include "internal/Isolate.hpp"
16#include "internal/JavaObjectHandle.hpp"
17#include "internal/NonCopyable.hpp"
18#include "internal/Platform.hpp"
19#include "internal/RawListWrapper.hpp"
20#include "internal/StopWatch.hpp"
21#include "internal/Timer.hpp"
22#include "internal/TimeFormat.hpp"
23
24#include "internal/context/ApiContext.hpp"
25
26#include "internal/managers/DXEndpointManager.hpp"
27#include "internal/managers/DXFeedManager.hpp"
28#include "internal/managers/DXFeedSubscriptionManager.hpp"
29#include "internal/managers/DXPublisherManager.hpp"
30#include "internal/managers/InstrumentProfileReaderManager.hpp"
31#include "internal/managers/InstrumentProfileCollectorManager.hpp"
32#include "internal/managers/InstrumentProfileConnectionManager.hpp"
33#include "internal/managers/EntityManager.hpp"
34#include "internal/managers/ErrorHandlingManager.hpp"
35
36#include "internal/utils/CmdArgsUtils.hpp"
37#include "internal/utils/EnumUtils.hpp"
38#include "internal/utils/StringUtils.hpp"
39#include "internal/utils/debug/Debug.hpp"
40
41#include "api/ApiModule.hpp"
42#include "ipf/IpfModule.hpp"
43#include "entity/EntityModule.hpp"
44#include "event/EventModule.hpp"
45#include "schedule/ScheduleModule.hpp"
46#include "symbols/StringSymbol.hpp"
47#include "symbols/SymbolWrapper.hpp"
48#include "system/System.hpp"
49
50#include "isolated/Isolated.hpp"
51
52#include "exceptions/JavaException.hpp"
53#include "exceptions/GraalException.hpp"
54
55#include "isolated/api/IsolatedDXEndpoint.hpp"
56#include "isolated/api/IsolatedDXPublisher.hpp"
57#include "isolated/api/IsolatedDXPublisherObservableSubscription.hpp"
58#include "isolated/api/osub/IsolatedObservableSubscriptionChangeListener.hpp"
59#include "isolated/internal/IsolatedString.hpp"
60#include "isolated/internal/IsolatedTimeFormat.hpp"
61#include "isolated/internal/IsolatedTools.hpp"
62
63#include "ondemand/OnDemandService.hpp"
64
#define DXFCXX_DISABLE_MSC_WARNINGS_POP()
Definition Conf.hpp:22
#define DXFCPP_END_NAMESPACE
Definition Conf.hpp:54
#define DXFCPP_BEGIN_NAMESPACE
Definition Conf.hpp:51
#define DXFCXX_DISABLE_MSC_WARNINGS_PUSH(warnings)
Definition Conf.hpp:21
dxfc_error_code_t dxfc_dxendpoint_create2(dxfc_dxendpoint_role_t role, void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Creates an endpoint with a specified role.
Definition DXEndpoint.cpp:827
dxfc_error_code_t dxfc_dxendpoint_get_feed(dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxfeed_t *feed)
Definition DXEndpoint.cpp:1103
dxfc_error_code_t dxfc_dxendpoint_builder_with_role(dxfc_dxendpoint_builder_t builder, dxfc_dxendpoint_role_t role)
Sets role for the created dxFeed endpoint.
Definition DXEndpoint.cpp:625
dxfc_error_code_t dxfc_dxendpoint_await_not_connected(dxfc_dxendpoint_t endpoint)
Waits while this endpoint state becomes NOT_CONNECTED or CLOSED.
Definition DXEndpoint.cpp:1020
dxfc_error_code_t dxfc_dxendpoint_password(dxfc_dxendpoint_t endpoint, const char *password)
Changes password for this endpoint.
Definition DXEndpoint.cpp:918
void * dxfc_dxendpoint_builder_t
The dxFeed endpoint's builder handle.
Definition api.h:185
dxfc_error_code_t dxfc_dxendpoint_get_instance2(dxfc_dxendpoint_role_t role, void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Returns a default application-wide singleton instance of DXEndpoint for a specific role.
Definition DXEndpoint.cpp:782
dxfc_dxendpoint_state_t
Represents the current state of endpoint.
Definition api.h:127
@ DXFC_DXENDPOINT_STATE_CLOSED
Endpoint was closed.
Definition api.h:147
@ DXFC_DXENDPOINT_STATE_NOT_CONNECTED
Endpoint was created by is not connected to remote endpoints.
Definition api.h:131
@ DXFC_DXENDPOINT_STATE_CONNECTING
The connect function was called to establish connection to remove endpoint, but connection is not act...
Definition api.h:137
@ DXFC_DXENDPOINT_STATE_CONNECTED
The connection to remote endpoint is established.
Definition api.h:142
dxfc_error_code_t dxfc_dxendpoint_disconnect_and_clear(dxfc_dxendpoint_t endpoint)
Terminates all remote network connections and clears stored data.
Definition DXEndpoint.cpp:986
dxfc_error_code_t dxfc_dxendpoint_create(void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Creates an endpoint with FEED role.
Definition DXEndpoint.cpp:805
#define DXFC_OUT
Definition api.h:17
dxfc_error_code_t dxfc_dxendpoint_builder_with_name(dxfc_dxendpoint_builder_t builder, const char *name)
Changes name that is used to distinguish multiple endpoints in the same process (GraalVM Isolate) in ...
Definition DXEndpoint.cpp:642
void * dxfc_dxendpoint_t
The dxFeed endpoint handle.
Definition api.h:176
dxfc_error_code_t dxfc_dxendpoint_reconnect(dxfc_dxendpoint_t endpoint)
Terminates all established network connections and initiates connecting again with the same address.
Definition DXEndpoint.cpp:952
dxfc_error_code_t dxfc_dxendpoint_builder_build(dxfc_dxendpoint_builder_t builder, void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Builds the new dxFeed endpoint instance.
Definition DXEndpoint.cpp:719
dxfc_error_code_t
List of error codes.
Definition api.h:27
@ DXFC_EC_ERROR
The error returned if the current operation cannot be completed.
Definition api.h:38
@ DXFC_EC_SUCCESS
OK.
Definition api.h:31
@ DXFC_EC_G_ERR
dxFeed Graal Native API error.
Definition api.h:35
dxfc_error_code_t dxfc_system_set_property(const char *key, const char *value)
Sets the system property indicated by the specified key.
Definition System.cpp:69
dxfc_error_code_t dxfc_system_get_property(const char *key, DXFC_OUT char *buffer, size_t buffer_size)
Gets the system property indicated by the specified key.
dxfc_error_code_t dxfc_dxendpoint_builder_supports_property(dxfc_dxendpoint_builder_t builder, const char *key, DXFC_OUT int *supports)
Checks if a property is supported.
Definition DXEndpoint.cpp:702
dxfc_error_code_t dxfc_dxendpoint_close(dxfc_dxendpoint_t endpoint)
Closes this endpoint.
Definition DXEndpoint.cpp:850
dxfc_error_code_t dxfc_dxendpoint_user(dxfc_dxendpoint_t endpoint, const char *user)
Changes user name for this endpoint.
Definition DXEndpoint.cpp:901
dxfc_error_code_t dxfc_dxendpoint_remove_state_change_listener(dxfc_dxendpoint_t endpoint, dxfc_dxendpoint_state_change_listener listener)
Removes listener that is notified about changes in state property.
Definition DXEndpoint.cpp:1080
void(* dxfc_dxendpoint_state_change_listener)(dxfc_dxendpoint_state_t old_state, dxfc_dxendpoint_state_t new_state, void *user_data)
The endpoint current state change listener.
Definition api.h:156
dxfc_error_code_t dxfc_dxendpoint_get_publisher(dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxpublisher_t *publisher)
Definition DXEndpoint.cpp:1108
dxfc_error_code_t dxfc_dxendpoint_get_state(dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxendpoint_state_t *state)
Returns the state of this endpoint.
Definition DXEndpoint.cpp:1037
dxfc_error_code_t dxfc_dxendpoint_builder_free(dxfc_dxendpoint_builder_t builder)
Removes a builder from the registry.
Definition DXEndpoint.cpp:748
dxfc_dxendpoint_role_t
Represents the role of endpoint that was specified during its creation.
Definition api.h:67
@ DXFC_DXENDPOINT_ROLE_PUBLISHER
PUBLISHER endpoint connects to the remote publisher hub (also known as multiplexor) or creates a publ...
Definition api.h:105
@ DXFC_DXENDPOINT_ROLE_STREAM_FEED
STREAM_FEED endpoint is similar to DXFC_DXENDPOINT_ROLE_FEED and also connects to the remote data fee...
Definition api.h:94
@ DXFC_DXENDPOINT_ROLE_FEED
FEED endpoint connects to the remote data feed provider and is optimized for real-time or delayed dat...
Definition api.h:77
@ DXFC_DXENDPOINT_ROLE_STREAM_PUBLISHER
STREAM_PUBLISHER endpoint is similar to DXFC_DXENDPOINT_ROLE_PUBLISHER and also connects to the remot...
Definition api.h:114
@ DXFC_DXENDPOINT_ROLE_LOCAL_HUB
LOCAL_HUB endpoint is a local hub without ability to establish network connections.
Definition api.h:121
@ DXFC_DXENDPOINT_ROLE_ON_DEMAND_FEED
ON_DEMAND_FEED endpoint is similar to DXFC_DXENDPOINT_ROLE_FEED, but it is designed to be used with d...
Definition api.h:85
void * dxfc_dxpublisher_t
The dxFeed publisher handle.
Definition api.h:195
dxfc_error_code_t dxfc_dxendpoint_builder_with_properties(dxfc_dxendpoint_builder_t builder, const dxfc_dxendpoint_property_t **properties, size_t size)
Sets all supported properties from the provided properties object.
Definition DXEndpoint.cpp:675
dxfc_error_code_t dxfc_dxendpoint_connect(dxfc_dxendpoint_t endpoint, const char *address)
Connects to the specified remote address.
Definition DXEndpoint.cpp:935
dxfc_error_code_t dxfc_dxendpoint_new_builder(DXFC_OUT dxfc_dxendpoint_builder_t *builder)
Creates new dxFeed endpoint's builder instance.
Definition DXEndpoint.cpp:609
void * dxfc_dxfeed_t
The dxFeed handle.
Definition api.h:190
dxfc_error_code_t dxfc_dxendpoint_close_and_await_termination(dxfc_dxendpoint_t endpoint)
Closes this endpoint and wait until all pending data processing tasks are completed.
Definition DXEndpoint.cpp:867
dxfc_error_code_t dxfc_dxendpoint_get_instance(void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Returns a default application-wide singleton instance of dxFeed endpoint with a FEED role.
Definition DXEndpoint.cpp:760
dxfc_error_code_t dxfc_dxendpoint_disconnect(dxfc_dxendpoint_t endpoint)
Terminates all remote network connections.
Definition DXEndpoint.cpp:969
dxfc_error_code_t dxfc_dxendpoint_add_state_change_listener(dxfc_dxendpoint_t endpoint, dxfc_dxendpoint_state_change_listener listener)
Adds listener that is notified about changes in state property.
Definition DXEndpoint.cpp:1054
dxfc_error_code_t dxfc_dxendpoint_free(dxfc_dxendpoint_t endpoint)
Removes the dxFeed endpoint from the registry.
Definition DXEndpoint.cpp:1113
dxfc_error_code_t dxfc_dxendpoint_get_role(dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxendpoint_role_t *role)
Returns the role of this endpoint.
Definition DXEndpoint.cpp:884
dxfc_error_code_t dxfc_dxendpoint_await_processed(dxfc_dxendpoint_t endpoint)
Waits until this endpoint stops processing data (becomes quiescent).
Definition DXEndpoint.cpp:1003
dxfc_error_code_t dxfc_dxendpoint_builder_with_property(dxfc_dxendpoint_builder_t builder, const char *key, const char *value)
Sets the specified property.
Definition DXEndpoint.cpp:658
The simple key-value structure that represents an endpoint's property.
Definition api.h:162
const char * key
The property's key.
Definition api.h:164
const char * value
The property's value.
Definition api.h:166