Apama  9.10.0.4.289795
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
com::softwareag::connectivity::AbstractCodec Class Reference

Abstract class for Codecs. 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 &name, const std::string &chainId, const map_t &config)
 Give the plugin instance name and the chain name. More...
 
virtual void setNextTowardsHost (HostSide::ptr_t &&host)
 Set the next in the chain towards the host. More...
 
virtual void setNextTowardsTransport (TransportSide::ptr_t &&transport)
 Set the next in the chain towards the transport. More...
 
- Public Member Functions inherited from com::softwareag::connectivity::Plugin
 Plugin (const std::string &name, const std::string &chainId, const map_t &config)
 Give the plugin instance name and the chain name. More...
 
virtual ~Plugin ()
 Virtual destructor to ensure that we can delete any part of the tree. More...
 
virtual void start ()
 Called when the plugin should be started up (after all plugins are connected together). More...
 
virtual void hostReady ()
 Called when the host indicates it is ready to start receiving input (sends will be queued until this point). More...
 
virtual void shutdown ()
 Release any resources created by the connectivity plug-in, 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
 Process or deliver 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
 Process or deliver a batch of messages heading towards the transport. 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...
 

Detailed Description

Abstract class for Codecs.

Sub-classed by codec plug-in authors to provide any required transformation of Message objects as they are sent towards the transport or host side. Holds pointers to the next plug-ins in the chain.

MapHelper can be used to extract the content of payload.

Codecs must have a constructor with this signature: (const std::string &name, const std::string &chainId, const map_t &config)

The instanceConfiguration is any instance-specific configuration. The name is the name of this plug-in. chainId is the chain's identifier as named in the configuration. All should be passed to the AbstractCodec/ AbstractSimpleCodec constructor.

An exception should be thrown from the constructor if the configuration is invalid.

Derives from Plugin, which provides name, chainId and LOGGER. Derives from HostSide, requiring derived classes to implement sendBatchTowardsHost Derives from TransportSide, requiring derived classes to implement sendBatchTowardsTransport

Derive from AbstractCodec if you want to handle messages in batches. Codecs should typically process a batch of Message objects and pass the batch on to the next plug-in in the chain. Unless they are looking for certain control messages, codecs should ignore messages with null payload, passing them on to the next plug-in in the chain untouched.

Derive from AbstractSimpleCodec instead if your codec is only concerned with single messages at a time.

Constructor & Destructor Documentation

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

Give the plugin instance name and the chain name.

Member Function Documentation

virtual void com::softwareag::connectivity::AbstractCodec::setNextTowardsHost ( HostSide::ptr_t &&  host)
inlinevirtual

Set the next in the chain towards the host.

virtual void com::softwareag::connectivity::AbstractCodec::setNextTowardsTransport ( TransportSide::ptr_t &&  transport)
inlinevirtual

Set the next in the chain towards the transport.


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