|
dxFeed Graal CXX API v9.0.0
|
A connection error of a message connector of an endpoint: a failed connect attempt or a dropped connection (DXEndpoint::getLastConnectionError(), MessageConnectorInfo::lastError). More...
#include <ConnectionError.hpp>
Public Types | |
| enum class | Category : std::int32_t { OTHER = 0 , DNS = 1 , CONNECT_FAILED = 2 , READ_TIMEOUT = 3 , HEARTBEAT_TIMEOUT = 4 , CLOSED_BY_REMOTE = 5 , TLS = 6 , IO = 7 } |
| The category of a connection error. More... | |
Public Member Functions | |
| std::string | toString () const |
| Returns a string representation of the error in one line: the time, the category, whether the connection was dropped, the address, the exception, the message and the count. | |
Static Public Member Functions | |
| static const char * | categoryToString (Category category) noexcept |
| Returns the name of a category, for example CONNECT_FAILED. | |
Public Attributes | |
| std::int64_t | time {} |
| The time of the error, in milliseconds since the UNIX epoch (UTC). | |
| std::string | address {} |
| The address the connector was configured with, credentials masked: for a multi-host address the whole list, not the host that failed. | |
| Category | category {Category::OTHER} |
| The category of the error. | |
| bool | dropped {} |
| true if an established connection was dropped, false if a connect attempt failed. | |
| std::string | exceptionClassName {} |
| The class name of the Java exception, for example java.net.ConnectException, or an empty string when there is none. | |
| std::string | message {} |
| The message of the exception (or of the log record when there is no exception), credentials masked, at most 256 characters; an empty string when there is none. | |
| std::int64_t | count {} |
| The number of errors of the connector up to this one: it grows with each new error. | |
A connection error of a message connector of an endpoint: a failed connect attempt or a dropped connection (DXEndpoint::getLastConnectionError(), MessageConnectorInfo::lastError).
The value is a copy: it does not change when the connector records a newer error. A successful connection clears nothing, the time tells how old the error is. See Connection troubleshooting.
This is an experimental API, it may change in future versions.
|
strong |
The category of a connection error.
A category that this version of the library does not know reads as OTHER.
|
staticnoexcept |
Returns the name of a category, for example CONNECT_FAILED.
| category | The category. |
References CLOSED_BY_REMOTE, CONNECT_FAILED, DNS, HEARTBEAT_TIMEOUT, IO, OTHER, READ_TIMEOUT, and TLS.
| std::string ConnectionError::toString | ( | ) | const |
Returns a string representation of the error in one line: the time, the category, whether the connection was dropped, the address, the exception, the message and the count.