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::AbstractSimpleTransport Class Referenceabstract

Helper derivative of AbstractTransport implementing message-by-message delivery. More...

#include <sag_connectivity_plugins.hpp>

Inheritance diagram for com::softwareag::connectivity::AbstractSimpleTransport:
com::softwareag::connectivity::AbstractTransport com::softwareag::connectivity::Plugin com::softwareag::connectivity::TransportSide

Public Member Functions

 AbstractSimpleTransport (const std::string &name, const std::string &chainId, const map_t &config)
 Give the plugin instance name and the chain name. More...
 
virtual void sendBatchTowardsTransport (Message *start, Message *end)
 Implements batch sending, calling deliverMessageTowardsTransport for each message individually. More...
 
virtual void deliverMessageTowardsTransport (Message &msg)=0
 Deliver an individual message. More...
 
virtual void deliverNullPayloadTowardsTransport (Message &msg)
 Deliver a message with a null payload. Default is to ignore it. More...
 
virtual void handleException (Message &m)
 Handle an exception thrown while delivering a message. More...
 
- Public Member Functions inherited from com::softwareag::connectivity::AbstractTransport
 AbstractTransport (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...
 
- 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::TransportSide
virtual ~TransportSide ()
 Ensure virtual destruction. More...
 

Additional Inherited Members

- 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

Helper derivative of AbstractTransport implementing message-by-message delivery.

If you don't need to handle events a batch at a time, then you should derive from this class. If you do then you should directly derive from AbstractTransport.

Constructor & Destructor Documentation

com::softwareag::connectivity::AbstractSimpleTransport::AbstractSimpleTransport ( 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::AbstractSimpleTransport::deliverMessageTowardsTransport ( Message msg)
pure virtual

Deliver an individual message.

virtual void com::softwareag::connectivity::AbstractSimpleTransport::deliverNullPayloadTowardsTransport ( Message msg)
inlinevirtual

Deliver a message with a null payload. Default is to ignore it.

virtual void com::softwareag::connectivity::AbstractSimpleTransport::handleException ( Message m)
inlinevirtual

Handle an exception thrown while delivering a message.

Default is to log a warning and discard a message.

You can override it yourself to have other behaviour. The Message which caused the error is passed in.

This is called from within a catch block, so if you need to know the exception thrown then you can rethrow it yourself:

try { throw; } catch (const type &ex) { ... }

virtual void com::softwareag::connectivity::AbstractSimpleTransport::sendBatchTowardsTransport ( Message start,
Message end 
)
inlinevirtual

Implements batch sending, calling deliverMessageTowardsTransport for each message individually.

Exceptions from deliverMessageTowardsTransport are caught and handleException is called. Processing continues for the next message.

Implements com::softwareag::connectivity::TransportSide.


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