Represents a Channel Client that can connect to a Channel Provider.
More...
#include <OpenFinAdapter.h>
|
shared_future< void > | connectAsync (bool wait=true) |
| Connects the client to a channel.
|
|
shared_future< void > | disconnectAsync () const |
| Disconnects the client from the channel.
|
|
shared_future< shared_ptr< string > > | dispatchAsync (const string &topic) const |
| Dispatches a signal on a topic to a channel provider, with no payload.
|
|
shared_future< shared_ptr< string > > | dispatchAsync (const string &topic, const string &payloadJson) const |
| Dispatches a payload on a topic to the channel provider.
|
|
void | subscribeDisconnected (const function< void()> &listener) |
| Creates a subscription to the channel disconnected event.
|
|
void | unsubscribeDisconnected (const function< void()> &listener) |
| Un-registers a listener from the channel disconnected event.
|
|
void | registerTopic (const string &topic, const function< shared_ptr< string >(shared_ptr< string >, EndpointId)> &listener) |
| Registers a listener of a topic.
|
|
void | unregisterTopic (const string &topic) |
| Unregisters a listener of a topic.
|
|
Represents a Channel Client that can connect to a Channel Provider.
◆ connectAsync()
shared_future< void > OpenFinAdapterApi::ChannelClient::connectAsync |
( |
bool | wait = true | ) |
|
Connects the client to a channel.
- Parameters
-
wait | whether to wait for the provider to open if not already open |
- Returns
- A shared pointer to an async future which completes when the connection has been established
◆ disconnectAsync()
shared_future< void > OpenFinAdapterApi::ChannelClient::disconnectAsync |
( |
| ) |
const |
Disconnects the client from the channel.
- Returns
- A shared pointer to an async future which completes when the channel has been disconnected
◆ dispatchAsync() [1/2]
shared_future< shared_ptr< string > > OpenFinAdapterApi::ChannelClient::dispatchAsync |
( |
const string & | topic | ) |
const |
Dispatches a signal on a topic to a channel provider, with no payload.
- Parameters
-
topic | The topic on which to dispatch the signal |
- Returns
- The response from the provider
◆ dispatchAsync() [2/2]
shared_future< shared_ptr< string > > OpenFinAdapterApi::ChannelClient::dispatchAsync |
( |
const string & | topic, |
|
|
const string & | payloadJson ) const |
Dispatches a payload on a topic to the channel provider.
- Parameters
-
topic | The topic on which to dispatch the payload |
payloadJson | The payload of the message in JSON format |
- Returns
- The response from the provider
◆ subscribeDisconnected()
void OpenFinAdapterApi::ChannelClient::subscribeDisconnected |
( |
const function< void()> & | listener | ) |
|
Creates a subscription to the channel disconnected event.
- Parameters
-
listener | The listener function |
◆ unsubscribeDisconnected()
void OpenFinAdapterApi::ChannelClient::unsubscribeDisconnected |
( |
const function< void()> & | listener | ) |
|
Un-registers a listener from the channel disconnected event.
- Parameters
-
listener | The registered listener function |
The documentation for this class was generated from the following file: