Apama  9.12.0.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AP_EventHandlerInterface Class Referenceabstract

An interface class that should be implemented by event handlers which are registered via AP_CorrelatorInterface::subscribe. More...

#include <correlator_plugin.hpp>

Public Types

typedef std::shared_ptr
< AP_EventHandlerInterface
ptr_t
 A smart-pointer type for managing lifetime of event handlers. More...
 

Public Member Functions

virtual ~AP_EventHandlerInterface ()
 Ensure we have a virtual destructor, so that derived class destructors can be correctly called. More...
 
virtual void handleEvent (const AP_Context &ctx, const char *event, const char *channel)=0
 Called for each event sent to a channel to which this event handler is subscribed. More...
 

Detailed Description

An interface class that should be implemented by event handlers which are registered via AP_CorrelatorInterface::subscribe.

Member Typedef Documentation

A smart-pointer type for managing lifetime of event handlers.

All event handlers must be stored in an AP_EventHandlerInterface::ptr_t. A reference is held by the correlator for each subscribed event handler. When the last reference is dropped, the event handler will be deleted.

Constructor & Destructor Documentation

virtual AP_EventHandlerInterface::~AP_EventHandlerInterface ( )
inlinevirtual

Ensure we have a virtual destructor, so that derived class destructors can be correctly called.

Member Function Documentation

virtual void AP_EventHandlerInterface::handleEvent ( const AP_Context ctx,
const char *  event,
const char *  channel 
)
pure virtual

Called for each event sent to a channel to which this event handler is subscribed.

Parameters
ctxExecution context for this invocation of the event handler.
eventthe event received. The event is represented as a string using the format described in the manual.
channelThe channel on which the event was received.

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