Apama  10.15.0.2
com::softwareag::connectivity::chainmanagers::ChainManagerHost< TRANSPORT > Class Template Reference

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...
 

Detailed Description

template<typename TRANSPORT>
class com::softwareag::connectivity::chainmanagers::ChainManagerHost< TRANSPORT >

API provided to Chain Managers for callbacks into the host, and for operations such as creating chains and registering channel lifecycle listeners.

Since
10.2.0.0

Member Function Documentation

◆ addChannelLifecycleListener()

template<typename TRANSPORT >
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.

Parameters
listenerThe listener which will get the notification when a channel starting with the channelPrefix is created or destroyed.
channelPrefixThe channel prefix for which listener should get callback.

◆ createChain()

template<typename TRANSPORT >
template<typename ... ARGS>
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.

Parameters
chainInstanceIdSuffixA 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.
defaultChannelTowardsHostDefault 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.
subscribeChannelsThe set of channels that the chain should be subscribed to (for messages from the host to the transport).
chainDefinitionThe definition of the chain (passed to the manager at construction time)
substitutionsA string/string map of..} variables to replace in the chainDefinition
transportConstructorArgsZero 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).
Returns
a pointer to the newly created transport instance??? or is it a reference to the chain containing that transport reference???. The lifetime of this transport is managed by the connectivity plug-ins framework, so if the chain manager retains any references to the transport it must ensure they are removed during transport shutdown or else at the very start of the transport's destructor.

The documentation for this class was generated from the following file: