|
dxFeed Graal CXX API v8.1.0
|
Builder class for DXEndpoint that supports additional configuration properties. More...
#include <DXEndpoint.hpp>
Inheritance diagram for DXEndpoint::Builder:Public Member Functions | |
| ~Builder () noexcept override | |
| Releases the GraalVM handle. | |
| std::shared_ptr< Builder > | withName (const StringLike &name) |
| Changes the name used to distinguish multiple endpoints in the same process (GraalVM Isolate) in logs and in other diagnostic means. | |
| std::shared_ptr< Builder > | withRole (Role role) |
| Sets role for the created DXEndpoint. | |
| std::shared_ptr< Builder > | withProperty (const StringLike &key, const StringLike &value) |
| Sets the specified property. | |
| template<typename Properties> | |
| std::shared_ptr< Builder > | withProperties (Properties &&properties) |
| Sets all supported properties from the provided properties object. | |
| bool | supportsProperty (const StringLike &key) const |
| Checks if a property is supported. | |
| template<typename Executor> | |
| std::shared_ptr< Builder > | withExecutor (const std::shared_ptr< Executor > &executor) |
| Sets the executor that is used for notifications (events, state changes, etc.) of the endpoint to build. | |
| std::shared_ptr< DXEndpoint > | build () |
| Builds DXEndpoint instance. | |
Public Member Functions inherited from SharedEntity | |
| template<typename T> | |
| bool | is () const noexcept |
| Checks that the pointer to the current type could be converted to type T* In other words: whether type T belongs to the type hierarchy in which the current type resides. | |
| template<typename T> | |
| std::shared_ptr< T > | sharedAs () noexcept |
| Returns a pointer to the current object wrapped in a smart pointer to type T or std::shared_ptr<T>{nullptr} if the object is not managed by std::shared_ptr. | |
| template<typename T> | |
| std::shared_ptr< T > | sharedAs () const noexcept |
| Returns a pointer to the current object wrapped in a smart pointer to type T or std::shared_ptr<T>{nullptr} if the object is not managed by std::shared_ptr. | |
| virtual std::string | toString () const |
| Returns a string representation of the current object. | |
Public Member Functions inherited from Entity | |
| virtual | ~Entity () noexcept |
| The default virtual d-tor. | |
Additional Inherited Members | |
Public Types inherited from SharedEntity | |
| using | Ptr = std::shared_ptr<SharedEntity> |
| The alias to a type of shared pointer to the SharedEntity object. | |
Static Public Member Functions inherited from RequireMakeShared< Builder > | |
| static auto | createShared (Args &&...args) |
| Creates a smart pointer to an object. | |
Builder class for DXEndpoint that supports additional configuration properties.
Some methods that are not marked noexcept may throw exceptions:
| InvalidArgumentException | if the handle is invalid. |
| JavaException | if something happened with the dxFeed API backend |
| GraalException | if something happened with the GraalVM |
| std::shared_ptr< DXEndpoint > DXEndpoint::Builder::build | ( | ) |
Builds DXEndpoint instance.
| InvalidArgumentException | |
| JavaException | |
| GraalException |
| bool DXEndpoint::Builder::supportsProperty | ( | const StringLike & | key | ) | const |
Checks if a property is supported.
| key | The property's key to be checked for support |
true if the corresponding property key is supported.| InvalidArgumentException | |
| JavaException | |
| GraalException |
|
inline |
Sets the executor that is used for notifications (events, state changes, etc.) of the endpoint to build.
By default, the endpoint uses a thread pool whose size is set by the DXEndpoint::DXFEED_THREAD_POOL_SIZE_PROPERTY or DXEndpoint::DXPUBLISHER_THREAD_POOL_SIZE_PROPERTY property.
| Executor | The executor's type (for example, InPlaceExecutor). |
| executor | The executor. |
this endpoint builder. | InvalidArgumentException | |
| JavaException | |
| GraalException |
| std::shared_ptr< DXEndpoint::Builder > DXEndpoint::Builder::withName | ( | const StringLike & | name | ) |
Changes the name used to distinguish multiple endpoints in the same process (GraalVM Isolate) in logs and in other diagnostic means.
This is a shortcut for withProperty(NAME_PROPERTY, name)
| name | The endpoint's name |
this endpoint builder. | InvalidArgumentException | |
| JavaException | |
| GraalException |
|
inline |
Sets all supported properties from the provided properties object.
| Properties | The properties' type (std::map, std::unordered_map, etc.) |
| properties | The endpoint's properties |
this endpoint builder.| InvalidArgumentException | |
| JavaException | |
| GraalException |
References withProperty().
| std::shared_ptr< DXEndpoint::Builder > DXEndpoint::Builder::withProperty | ( | const StringLike & | key, |
| const StringLike & | value ) |
Sets the specified property.
Unsupported properties are ignored.
| key | The endpoint's property key |
| value | The endpoint's property value |
this endpoint builder.| InvalidArgumentException | |
| JavaException | |
| GraalException |
Referenced by withProperties().
| std::shared_ptr< DXEndpoint::Builder > DXEndpoint::Builder::withRole | ( | Role | role | ) |
Sets role for the created DXEndpoint.
The default role is FEED.
| role | The endpoint's role |
this endpoint builder. | InvalidArgumentException | |
| JavaException | |
| GraalException |