Apama
10.15.0.2
|
Base class for transport chain manager plug-ins. More...
#include <sag_connectivity_chain_managers.hpp>
Public Types | |
typedef TRANSPORT | transport_t |
The transport that this host can create chains for. More... | |
Public Member Functions | |
AbstractChainManager (const ChainManagerConstructorParameters ¶ms) | |
Give the manager instance name, a host object for callbacks, the configuration specified in managerConfig and the map of chain definitions passed to the manager constructor. More... | |
virtual | ~AbstractChainManager () |
Virtual destructor. More... | |
virtual void | start () |
Called after the chain manager is created to indicate that it can make external connections, create threads and create chains. More... | |
virtual void | shutdown () |
Release any resources created by the connectivity plug-in, and terminate and join any background threads. More... | |
StatusReporter & | getStatusReporter () |
Allows reporting status information from this plug-in, such as connected/disconnected status and number of messages sent/received in each direction. More... | |
Public Attributes | |
const Logger | logger |
A logger to be used by this manager for anything which needs to be written to the host's log. More... | |
const std::string | managerName |
The name used in the configuration for this dynamic chain manager. More... | |
const std::string | transportPluginName |
The name used in the configuration for the transport plug-in that created this chain manager. More... | |
Protected Types | |
typedef Chain< TRANSPORT >::ptr_t | chain_t |
The chain that this host can create. More... | |
typedef AbstractChainManager< TRANSPORT > | abstract_chain_manager_t |
The base class. More... | |
Protected Member Functions | |
const ChainDefinition & | getChainDefinition () |
Helper method to get the chain definition containing the transport associated with this manager, assuming there is only one. More... | |
const ChainDefinition & | getChainDefinition (const std::string &str) |
Helper method to get the chain definition containing the transport associated with this manager, assuming there is only one. More... | |
Protected Attributes | |
ChainDefinitions | chainDefinitions |
string-> map of chain definitions More... | |
const ChainManagerHost< TRANSPORT > | host |
The interface through which the host provides services required by chain managers. More... | |
map_t | config |
The configuration of this plug-in. More... | |
Base class for transport chain manager plug-ins.
The manager will only be shutdown and destroyed on correlator shutdown. On correlator shutdown, the order of callbacks is:
The manager can thus call Chain.destroy() during shutdown, but not after, and is not required to. To export a transport chain manager class for use in the host you should use the SAG_DECLARE_CONNECTIVITY_TRANSPORT_CLASS_CHAIN_MANAGER(Class) macro ; the transport should not be exported The ChainManager must provide a public constructor with the same signature as AbstractChainManager(const ChainManagerConstructorParameters ¶ms)
|
protected |
The base class.
|
protected |
The chain that this host can create.
typedef TRANSPORT com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::transport_t |
The transport that this host can create chains for.
|
inline |
Give the manager instance name, a host object for callbacks, the configuration specified in managerConfig and the map of chain definitions passed to the manager constructor.
|
inlinevirtual |
Virtual destructor.
|
inlineprotected |
Helper method to get the chain definition containing the transport associated with this manager, assuming there is only one.
|
inlineprotected |
Helper method to get the chain definition containing the transport associated with this manager, assuming there is only one.
str | a chainDefinitionId. |
|
inline |
Allows reporting status information from this plug-in, such as connected/disconnected status and number of messages sent/received in each direction.
|
inlinevirtual |
Release any resources created by the connectivity plug-in, and terminate and join any background threads.
The host will call this before the process shuts down.
Note that ChannelLifecycleListener notification methods will not be invoked once shutdown begins, and shutdown() will not be called until any in-progress notifications have returned.
The default implementation is a no-op.
Implementors should usually explicitly destroy all chains created by the manager and then terminate and join any connections and background threads before returning from shutdown(). Any remaining chains will be automatically destroyed after the chain manager's shutdown() has returned, but it is usually safest to destroy them explicitly as part of shutdown().
|
inlinevirtual |
Called after the chain manager is created to indicate that it can make external connections, create threads and create chains.
If start throws this is a fatal startup error.
Default implementation is a no-op. You must override this if you need to signal startup.
|
protected |
string-> map of chain definitions
|
protected |
The configuration of this plug-in.
The plug-in owns and is free to mutate this data structure.
|
protected |
The interface through which the host provides services required by chain managers.
const Logger com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::logger |
A logger to be used by this manager for anything which needs to be written to the host's log.
The host will take care of adding the transport and manager name to the messages logged using this object.
const std::string com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::managerName |
The name used in the configuration for this dynamic chain manager.
const std::string com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::transportPluginName |
The name used in the configuration for the transport plug-in that created this chain manager.