|
dxFeed Graal Native SDK 3.9.0
|
Topics | |
| Builder | |
Data Structures | |
| struct | dxfg_endpoint_t |
| The DXEndpoint. Javadoc. More... | |
| struct | dxfg_endpoint_builder_t |
| The DXEndpoint.Builder. Javadoc. More... | |
| struct | dxfg_endpoint_state_change_listener_t |
| The PropertyChangeListener. Javadoc. More... | |
Typedefs | |
| typedef struct dxfg_feed_t | dxfg_feed_t |
| Forward declarations. | |
| typedef struct dxfg_publisher_t | dxfg_publisher_t |
| typedef struct dxfg_event_clazz_list_t | dxfg_event_clazz_list_t |
| typedef struct dxfg_endpoint_t | dxfg_endpoint_t |
| The DXEndpoint. Javadoc. | |
| typedef struct dxfg_endpoint_builder_t | dxfg_endpoint_builder_t |
| The DXEndpoint.Builder. Javadoc. | |
| typedef struct dxfg_endpoint_state_change_listener_t | dxfg_endpoint_state_change_listener_t |
| The PropertyChangeListener. Javadoc. | |
| typedef enum dxfg_endpoint_role_t | dxfg_endpoint_role_t |
| List of endpoint roles. Javadoc. | |
| typedef enum dxfg_endpoint_state_t | dxfg_endpoint_state_t |
| List of endpoint states. Javadoc. | |
| typedef 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) |
| Function pointer to the endpoint state change listener. | |
Enumerations | |
| enum | dxfg_endpoint_role_t { DXFG_ENDPOINT_ROLE_FEED = 0 , DXFG_ENDPOINT_ROLE_ON_DEMAND_FEED , DXFG_ENDPOINT_ROLE_STREAM_FEED , DXFG_ENDPOINT_ROLE_PUBLISHER , DXFG_ENDPOINT_ROLE_STREAM_PUBLISHER , DXFG_ENDPOINT_ROLE_LOCAL_HUB } |
| List of endpoint roles. Javadoc. More... | |
| enum | dxfg_endpoint_state_t { DXFG_ENDPOINT_STATE_NOT_CONNECTED = 0 , DXFG_ENDPOINT_STATE_CONNECTING , DXFG_ENDPOINT_STATE_CONNECTED , DXFG_ENDPOINT_STATE_CLOSED } |
| List of endpoint states. Javadoc. More... | |
| typedef struct dxfg_endpoint_builder_t dxfg_endpoint_builder_t |
The DXEndpoint.Builder. Javadoc.
| typedef enum dxfg_endpoint_role_t dxfg_endpoint_role_t |
List of endpoint roles. Javadoc.
| typedef 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) |
Function pointer to the endpoint state change listener.
| [in] | thread | The pointer to a run-time data structure for the thread. |
| [in] | old_state | The old endpoint state. |
| [in] | new_state | The new endpoint state. |
| [in,out] | user_data | The pointer to user data. |
| typedef struct dxfg_endpoint_state_change_listener_t dxfg_endpoint_state_change_listener_t |
The PropertyChangeListener. Javadoc.
| typedef enum dxfg_endpoint_state_t dxfg_endpoint_state_t |
List of endpoint states. Javadoc.
| typedef struct dxfg_endpoint_t dxfg_endpoint_t |
The DXEndpoint. Javadoc.
| typedef struct dxfg_event_clazz_list_t dxfg_event_clazz_list_t |
| typedef struct dxfg_feed_t dxfg_feed_t |
Forward declarations.
| typedef struct dxfg_publisher_t dxfg_publisher_t |
| enum dxfg_endpoint_role_t |
List of endpoint roles. Javadoc.
| Enumerator | |
|---|---|
| DXFG_ENDPOINT_ROLE_FEED | |
| DXFG_ENDPOINT_ROLE_ON_DEMAND_FEED | |
| DXFG_ENDPOINT_ROLE_STREAM_FEED | |
| DXFG_ENDPOINT_ROLE_PUBLISHER | |
| DXFG_ENDPOINT_ROLE_STREAM_PUBLISHER | |
| DXFG_ENDPOINT_ROLE_LOCAL_HUB | |
List of endpoint states. Javadoc.
| Enumerator | |
|---|---|
| DXFG_ENDPOINT_STATE_NOT_CONNECTED | |
| DXFG_ENDPOINT_STATE_CONNECTING | |
| DXFG_ENDPOINT_STATE_CONNECTED | |
| DXFG_ENDPOINT_STATE_CLOSED | |
| 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()).
The state changes are delivered by a single task on the endpoint's executor that reports the change from the last reported state to the current one, so the fast changes are coalesced (e.g. DXFG_ENDPOINT_STATE_NOT_CONNECTED -> DXFG_ENDPOINT_STATE_CONNECTED without DXFG_ENDPOINT_STATE_CONNECTING). A notification may come after dxfg_DXEndpoint_close() or dxfg_DXEndpoint_removeStateChangeListener() returns.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | endpoint | The endpoint. |
| [in] | listener | The listener. |
| int32_t dxfg_DXEndpoint_awaitNotConnected | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_t * | endpoint ) |
| int32_t dxfg_DXEndpoint_awaitProcessed | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_t * | 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 that.
The function does not wait for the notifications that are already scheduled: a state change listener (including the change to DXFG_ENDPOINT_STATE_CLOSED) or an event listener may still be called after it returns. Use dxfg_DXEndpoint_closeAndAwaitTermination() to wait for them, or dxfg_JavaObjectHandler_release() of the listener to stop its calls (see dxfg_JavaObjectHandler_release()).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | endpoint | The endpoint. |
| 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 completed (DXEndpoint.closeAndAwaitTermination()). Do not call it from a listener of this endpoint: it would wait for the notification that is calling it.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | endpoint | The endpoint. |
| int32_t dxfg_DXEndpoint_connect | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_t * | endpoint, | ||
| const char * | address ) |
| dxfg_endpoint_t * dxfg_DXEndpoint_create | ( | graal_isolatethread_t * | thread | ) |
Creates a new endpoint with the DXFG_ENDPOINT_ROLE_FEED role (DXEndpoint.create()).
| [in] | thread | The current GraalVM Isolate's thread. |
| dxfg_endpoint_t * dxfg_DXEndpoint_create2 | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_role_t | role ) |
Creates a new endpoint with the given role (DXEndpoint.create(role)).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | role | The role of the endpoint. |
| int32_t dxfg_DXEndpoint_disconnect | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_t * | endpoint ) |
| int32_t dxfg_DXEndpoint_disconnectAndClear | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_t * | endpoint ) |
| 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 (DXEndpoint.executor(executor)).
Call it before dxfg_DXEndpoint_getFeed() (and before the other functions that use the endpoint's feed, e.g. dxfg_OnDemandService_getInstance2()). Otherwise, the feed keeps using the default executor, which is shut down, and the last events requests (dxfg_DXFeed_getLastEventPromise(), etc.) never complete (a RejectedExecutionException is logged).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | endpoint | The endpoint. |
| [in] | executor | The executor. |
| dxfg_event_clazz_list_t * dxfg_DXEndpoint_getEventTypes | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_t * | endpoint ) |
Returns a set of all event types supported by this endpoint and the current version of the dxFeed Native Graal SDK (all other event types will be filtered out).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | endpoint | The endpoint. |
| dxfg_feed_t * dxfg_DXEndpoint_getFeed | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_t * | endpoint ) |
| dxfg_endpoint_t * dxfg_DXEndpoint_getInstance | ( | graal_isolatethread_t * | thread | ) |
Returns the default application-wide singleton endpoint with the DXFG_ENDPOINT_ROLE_FEED role (DXEndpoint.getInstance()), the same one that dxfg_DXFeed_getInstance() uses. It is configured by the system properties (see dxfg_system_set_property()) when it is first used.
All callers share this endpoint: closing it closes it for everyone in the process.
| [in] | thread | The current GraalVM Isolate's thread. |
| 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().
Unlike the Java DXEndpoint.getInstance(role), this function does not return a singleton. Prefer dxfg_DXEndpoint_newBuilder() (or dxfg_DXEndpoint_create2()) in the new code.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | role | The role of the endpoint. |
| dxfg_publisher_t * dxfg_DXEndpoint_getPublisher | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_t * | endpoint ) |
| dxfg_endpoint_role_t dxfg_DXEndpoint_getRole | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_t * | endpoint ) |
| dxfg_endpoint_state_t dxfg_DXEndpoint_getState | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_t * | endpoint ) |
| int32_t dxfg_DXEndpoint_password | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_t * | endpoint, | ||
| const char * | password ) |
| int32_t dxfg_DXEndpoint_reconnect | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_t * | endpoint ) |
| int32_t dxfg_DXEndpoint_removeStateChangeListener | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_t * | endpoint, | ||
| dxfg_endpoint_state_change_listener_t * | listener ) |
| int32_t dxfg_DXEndpoint_user | ( | graal_isolatethread_t * | thread, |
| dxfg_endpoint_t * | endpoint, | ||
| const char * | user ) |
| 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.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | user_func | The function to call on the state changes (see dxfg_DXEndpoint_addStateChangeListener()). |
| [in] | user_data | The user data to pass to the function. |