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

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 &params)
 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...
 
StatusReportergetStatusReporter ()
 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 ChainDefinitiongetChainDefinition ()
 Helper method to get the chain definition containing the transport associated with this manager, assuming there is only one. More...
 
const ChainDefinitiongetChainDefinition (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...
 

Detailed Description

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

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:

  • ChainManager.shutdown() called. This is the last point a chain manager can safely call destroy() on any Chains it has created.
  • Transport.shutdown() called on any remaining transports.
  • Transports destroyed (destructor called) on any remaining transports.
  • ChainManager destroyed (destructor called).

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 &params)

Since
10.2.0.0

Member Typedef Documentation

◆ abstract_chain_manager_t

template<typename TRANSPORT >
typedef AbstractChainManager<TRANSPORT> com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::abstract_chain_manager_t
protected

The base class.

◆ chain_t

template<typename TRANSPORT >
typedef Chain<TRANSPORT>::ptr_t com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::chain_t
protected

The chain that this host can create.

◆ transport_t

template<typename TRANSPORT >
typedef TRANSPORT com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::transport_t

The transport that this host can create chains for.

Constructor & Destructor Documentation

◆ AbstractChainManager()

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.

◆ ~AbstractChainManager()

template<typename TRANSPORT >
virtual com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::~AbstractChainManager ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ getChainDefinition() [1/2]

template<typename TRANSPORT >
const ChainDefinition& com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::getChainDefinition ( )
inlineprotected

Helper method to get the chain definition containing the transport associated with this manager, assuming there is only one.

◆ getChainDefinition() [2/2]

template<typename TRANSPORT >
const ChainDefinition& com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::getChainDefinition ( const std::string &  str)
inlineprotected

Helper method to get the chain definition containing the transport associated with this manager, assuming there is only one.

Parameters
stra chainDefinitionId.

◆ getStatusReporter()

template<typename TRANSPORT >
StatusReporter& com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::getStatusReporter ( )
inline

Allows reporting status information from this plug-in, such as connected/disconnected status and number of messages sent/received in each direction.

◆ shutdown()

template<typename TRANSPORT >
virtual void com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::shutdown ( )
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().

◆ start()

template<typename TRANSPORT >
virtual void com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::start ( )
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.

Member Data Documentation

◆ chainDefinitions

template<typename TRANSPORT >
ChainDefinitions com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::chainDefinitions
protected

string-> map of chain definitions

◆ config

template<typename TRANSPORT >
map_t com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::config
protected

The configuration of this plug-in.

The plug-in owns and is free to mutate this data structure.

◆ host

template<typename TRANSPORT >
const ChainManagerHost<TRANSPORT> com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::host
protected

The interface through which the host provides services required by chain managers.

◆ logger

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

◆ managerName

template<typename TRANSPORT >
const std::string com::softwareag::connectivity::chainmanagers::AbstractChainManager< TRANSPORT >::managerName

The name used in the configuration for this dynamic chain manager.

◆ transportPluginName

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


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