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

Base of the inheritance tree for Connectivity plugins. More...

#include <sag_connectivity_plugins.hpp>

Inheritance diagram for com::softwareag::connectivity::Plugin:
com::softwareag::connectivity::AbstractCodec com::softwareag::connectivity::AbstractTransport com::softwareag::connectivity::AbstractSimpleCodec com::softwareag::connectivity::AbstractSimpleTransport

Public Member Functions

virtual ~Plugin ()
 Virtual destructor to ensure that we can delete any part of the tree. 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 ()
 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 Attributes

Logger LOGGER
 Legacy logging for writing to the host log file. More...
 
Logger logger
 Logging for writing to the host log file. More...
 

Protected Attributes

std::string name
 The name used for this plug-in in the configuration file. More...
 
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...
 

Detailed Description

Base of the inheritance tree for Connectivity plugins.

Normally plugins will implement either AbstractCodec or AbstractTransport, or one of their Simple variants.

This base class provides several useful members to its derived classes.

Constructor & Destructor Documentation

virtual com::softwareag::connectivity::Plugin::~Plugin ( )
inlinevirtual

Virtual destructor to ensure that we can delete any part of the tree.

Member Function Documentation

const std::string& com::softwareag::connectivity::Plugin::getName ( ) const
inline

Return the name of this plugin instance.

virtual void com::softwareag::connectivity::Plugin::hostReady ( )
inlinevirtual

Called some time after start(), when the host is ready to start receiving input (sends will be queued until this point).

Plug-ins are not required to do anything at this point, though some transports may choose to avoid pulling events from an external system until the host is ready.

Default implementation is a no-op.

virtual void com::softwareag::connectivity::Plugin::shutdown ( )
inlinevirtual

Release any resources created by the connectivity plug-in, and terminate and join any background threads.

The host will call this before shutdown.

This method will never be called more than once on this instance. Implementations should ensure they work correctly even if the start() method was not called.

If the plug-in is blocked waiting to send a message it should attempt to cancel the operation when this method is called. The plug-in must ensure that any calls to hostSide or transportSide are completed before returning from this method and not initiate any calls after this has completed. This is typically achieved by interrupting and joining any threads that this plug-in has started (i.e. waiting for the threads to terminate).

Default implementation is a no-op. You must override it if you need to wait for anything.

virtual void com::softwareag::connectivity::Plugin::start ( )
inlinevirtual

Called when an entire chain has been created and the plugin is allowed to start up (after all plugins are connected together).

Some plug-ins will initiate a connection or create background threads in their start method.

You must not call methods on hostSide or transportSide before start() is called.

The start method will never be called more than once on this instance.

Default implementation is a no-op.

Member Data Documentation

std::string com::softwareag::connectivity::Plugin::chainId
protected

The identifier used for the chain this plug-in is part of.

map_t com::softwareag::connectivity::Plugin::config
protected

The configuration of this plug-in.

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

Logger com::softwareag::connectivity::Plugin::LOGGER

Legacy logging for writing to the host log file.

Use the logger field instead of this; the behaviour is identical but LOGGER will be deprecated in a future release to improve naming consistency.

Logger com::softwareag::connectivity::Plugin::logger

Logging for writing to the host log file.

Since
9.12.0.1
std::string com::softwareag::connectivity::Plugin::name
protected

The name used for this plug-in in the configuration file.


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