Apama
10.15.0.2
|
API provided to Chain Managers for callbacks into the host, and for operations such as creating chains and registering channel lifecycle listeners. More...
#include <sag_connectivity_chain_managers.hpp>
template<typename ... ARGS> | |
Chain< TRANSPORT >::ptr_t | createChain (const std::string &chainInstanceIdSuffix, const std::string &defaultChannelTowardsHost, const list_t &subscribeChannels, const ChainDefinition &chainDefinition, const map_t &substitutions, ARGS ... transportConstructorArgs) const |
Create a chain instance programmatically. More... | |
void | addChannelLifecycleListener (ChannelLifecycleListener *listener, const std::string &channelPrefix) const |
Register a callback handler for subscribe/unsubscribe and send-to notifications. More... | |
API provided to Chain Managers for callbacks into the host, and for operations such as creating chains and registering channel lifecycle listeners.
void com::softwareag::connectivity::chainmanagers::ChainManagerHost< TRANSPORT >::addChannelLifecycleListener | ( | ChannelLifecycleListener * | listener, |
const std::string & | channelPrefix | ||
) | const |
Register a callback handler for subscribe/unsubscribe and send-to notifications.
This method does not take ownership of the specified listener, but the listener must not be deleted until after the chain manager has been shutdown. Typically the ChainManager class will itself implement the listener interface, in which case the listener's lifetime will be correct without further action.
listener | The listener which will get the notification when a channel starting with the channelPrefix is created or destroyed. |
channelPrefix | The channel prefix for which listener should get callback. |
Chain<TRANSPORT>::ptr_t com::softwareag::connectivity::chainmanagers::ChainManagerHost< TRANSPORT >::createChain | ( | const std::string & | chainInstanceIdSuffix, |
const std::string & | defaultChannelTowardsHost, | ||
const list_t & | subscribeChannels, | ||
const ChainDefinition & | chainDefinition, | ||
const map_t & | substitutions, | ||
ARGS ... | transportConstructorArgs | ||
) | const |
Create a chain instance programmatically.
chainInstanceIdSuffix | A string identifier which will be suffixed onto "managerName-" to uniquely identify the new chain instance. Caution: A small amount of memory is allocated for each unique chain instance identifier. This memory is not freed when the chain is destroyed. Therefore, if you are creating many chains, consider reusing old chain instance identifiers. If you create more than 1000 unique identifiers, a warning is written to the correlator log file to notify you of this. You cannot have two active chains with the same chain instance identifier, so only reuse identifiers which are no longer in use. |
defaultChannelTowardsHost | Default channel to use for sending a message towards the host if no channel is specified on the message; use empty string for no default. It is an error to specify a non-empty defaultChannelTowardsHost value if defaultChannel is also specified for the host plug-in. |
subscribeChannels | The set of channels that the chain should be subscribed to (for messages from the host to the transport). |
chainDefinition | The definition of the chain (passed to the manager at construction time) |
substitutions | A string/string map of..} variables to replace in the chainDefinition |
transportConstructorArgs | Zero or more arguments to be passed to the transport constructor as part of chain creation. The order and type of arguments must match those in the transport constructor (after the ManagedTransportConstructorParameters argument). |