Apama  10.0.0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
com::softwareag::connectivity::AbstractCodec Class Reference

Base class for codec plug-ins. More...

#include <sag_connectivity_plugins.hpp>

Inheritance diagram for com::softwareag::connectivity::AbstractCodec:
com::softwareag::connectivity::Plugin com::softwareag::connectivity::HostSide com::softwareag::connectivity::TransportSide com::softwareag::connectivity::AbstractSimpleCodec

Public Member Functions

 AbstractCodec (const std::string &pluginName, const std::string &chainId, const map_t &config)
 Legacy constructor [DEPRECATED]. More...
 
 AbstractCodec (const PluginConstructorParameters::CodecConstructorParameters &params)
 Constructor. More...
 
- Public Member Functions inherited from com::softwareag::connectivity::Plugin
virtual ~Plugin ()
 This destructor must be virtual. More...
 
virtual void start ()
 Called when an entire chain has been created and the plugin is allowed to start up (after all plugins are connected together). More...
 
virtual void hostReady ()
 Called some time after start(), when the host is ready to start receiving input (sends will be queued until this point). More...
 
virtual void shutdown ()
 Stop processing messages and terminate and join any background threads. More...
 
const std::string & getName () const
 Return the name of this plugin instance. More...
 
- Public Member Functions inherited from com::softwareag::connectivity::HostSide
virtual ~HostSide ()
 Ensure virtual destruction. More...
 
virtual void sendBatchTowardsHost (Message *start, Message *end)=0
 Abstract method that must be implemented to handle delivery of a batch of messages heading towards the host. More...
 
- Public Member Functions inherited from com::softwareag::connectivity::TransportSide
virtual ~TransportSide ()
 Ensure virtual destruction. More...
 
virtual void sendBatchTowardsTransport (Message *start, Message *end)=0
 Abstract method that must be implemented to handle delivery of a batch of messages heading towards the transport. More...
 

Protected Attributes

HostSide::ptr_t hostSide
 The next plug-in in the chain towards host. More...
 
TransportSide::ptr_t transportSide
 The next plug-in in the chain towards transport. More...
 
- Protected Attributes inherited from com::softwareag::connectivity::Plugin
const std::string name
 The name used for this plug-in in the configuration file [DEPRECATED]. More...
 
const std::string pluginName
 The name used for this plug-in in the configuration file. More...
 
const std::string chainId
 The identifier used for the chain this plug-in is part of. More...
 
map_t config
 The configuration of this plug-in. More...
 
const PluginHost::ptr_t host
 Interface to support miscellaneous requests from this plug-in to the host system. More...
 

Additional Inherited Members

- Public Types inherited from com::softwareag::connectivity::HostSide
typedef std::auto_ptr< HostSideptr_t
 Pointers to HostSides should always be this ptr_t type, which is a std::auto_ptr. More...
 
- Public Types inherited from com::softwareag::connectivity::TransportSide
typedef std::auto_ptr
< TransportSide
ptr_t
 Pointers to TransportSides should always be this ptr_t type, which is a std::auto_ptr. More...
 
- Public Attributes inherited from com::softwareag::connectivity::Plugin
Logger LOGGER
 Legacy logging for writing to the host log file [DEPRECATED]. More...
 
Logger logger
 Logging for writing to the host log file. More...
 
- Protected Member Functions inherited from com::softwareag::connectivity::Plugin
StatusReportergetStatusReporter ()
 Allows reporting status information from this plug-in, such as connected/disconnected status and number of messages sent/received in each direction. More...
 

Detailed Description

Base class for codec plug-ins.

Implementors may derive directly from this class, providing an implementation of its abstract methods to provide any required transformation of Message objects as they are sent towards the transport or host side. For many codecs, inheriting from AbstractSimpleCodec may be more convenient than using this class directly, as it deals with batching of messages and ignoring messages with null payloads.

To export a codec class for use in the host you should use the SAG_DECLARE_CONNECTIVITY_CODEC_CLASS(Class) macro, and provide a public constructor with the same signature as AbstractCodec(const PluginConstructorParameters::CodecConstructorParameters &).

The deprecated legacy constructor AbstractCodec(const std::string &name, const std::string &chainId, const map_t &config) and SAG_DECLARE_CONNECTIVITY_CODEC(Class) macro are still permitted as an alternative but should not be used for new plug-ins.

MapHelper can be used to extract the content of the message.

Derives from Plugin, which provides Plugin::pluginName, Plugin::chainId, Plugin::config and Plugin::logger members. Derives from HostSide, requiring derived classes to implement sendBatchTowardsHost(Message*, Message*) Derives from TransportSide, requiring derived classes to implement sendBatchTowardsTransport(Message*, Message*)

Constructor & Destructor Documentation

com::softwareag::connectivity::AbstractCodec::AbstractCodec ( const std::string &  pluginName,
const std::string &  chainId,
const map_t config 
)
inline

Legacy constructor [DEPRECATED].

Deprecated:
This can only be used with the legacy macro SAG_DECLARE_CONNECTIVITY_CODEC(Class) and is deprecated. Please use the alternative constructor signature AbstractCodec(const PluginConstructorParameters::CodecConstructorParameters &) instead for new plug-ins that use the SAG_DECLARE_CONNECTIVITY_CODEC_CLASS(Class) macro.

A plug-in should throw an exception from the constructor if there is a problem with the configuration or any other error that will prevent the plug-in from working correctly.

Parameters
pluginNameThe name used in the configuration file for this plug-in.
chainIdThe identifier used for the chain this plug-in is part of.
configThe configuration for this plug-in.
com::softwareag::connectivity::AbstractCodec::AbstractCodec ( const PluginConstructorParameters::CodecConstructorParameters params)
inline

Constructor.

A subclass should provide its own constructor with the same signature as this one.

A plug-in should throw an exception from the constructor if there is a problem with the configuration or any other error that will prevent the plug-in from working correctly.

Parameters
paramsProvides access to the configuration for this plug-in, and other capabilities.
Since
9.12.0.1

Member Data Documentation

HostSide::ptr_t com::softwareag::connectivity::AbstractCodec::hostSide
protected

The next plug-in in the chain towards host.

This field will be given a valid value before the start() method is called.

TransportSide::ptr_t com::softwareag::connectivity::AbstractCodec::transportSide
protected

The next plug-in in the chain towards transport.

This field will be given a valid value before the start() method is called.


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