fintp_connectors
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Endpoint Class Referenceabstract

#include <Endpoint.h>

Inheritance diagram for Endpoint:

Public Member Functions

virtual ~Endpoint ()
 
void Start ()
 
void Stop ()
 
virtual void Init ()=0
 
virtual string Prepare ()=0
 Make an engagement whether it can/can't process the data More...
 
virtual void Commit ()=0
 Commits the work More...
 
virtual void Abort ()=0
 Aborts the work More...
 
virtual void Rollback ()=0
 Rolls back the data More...
 
virtual void Process (const string &correlationId)=0
 Processes the data More...
 
bool PerformMessageLoop ()
 
bool PerformMessageLoop (bool inBatch)
 
virtual bool moreMessages () const
 
virtual void trackMessage (const string &payload, const NameValueCollection &transportHeaders)
 
void setPersistenceFacility (AbstractStatePersistence *facility)
 
AbstractStatePersistence * getPersistenceFacility ()
 
void setServiceName (const string &value)
 
void setServiceThreadId (const string &serviceThreadId)
 
pthread_t getThreadId ()
 
const pthread_t getThreadId () const
 
virtual pthread_t getWatcherThreadId ()=0
 
FilterChain * getFilterChain ()
 
BatchManagerBase * getBatchManager ()
 

Static Public Member Functions

static void * StartInNewThread (void *)
 
static void setManagementCallback (void(*callback)(TransactionStatus::TransactionStatusEnum, void *))
 
static void setGlobalSettings (AppSettings *settings)
 

Protected Member Functions

virtual void internalStart ()=0
 
virtual void internalStop ()=0
 
 Endpoint ()
 
string getServiceName () const
 
void setCorrelationId (const string &correlationId)
 
AppSettings & getGlobalSettings () const
 
bool haveGlobalSetting (const EndpointConfig::ConfigDirection prefix, const EndpointConfig::ConfigSettings setting) const
 
string getGlobalSetting (const EndpointConfig::ConfigDirection prefix, const EndpointConfig::ConfigSettings setting, const string &defaultValue="__NODEFAULT") const
 

Protected Attributes

BatchManagerBase * m_BatchManager
 
AbstractStatePersistence * m_PersistenceFacility
 
unsigned int m_BackoutCount
 
unsigned int m_CurrentStage
 
unsigned int m_CrtBatchItem
 
string m_ServiceName
 
string m_ServiceThreadId
 
string m_CorrelationId
 
string m_LastFailureCorrelationId
 
string m_TransactionKey
 
pthread_t m_SelfThreadId
 
bool m_Running
 
bool m_LastOpSucceeded
 
AbstractWatcher::NotificationPool m_NotificationPool
 
NameValueCollection m_TransportHeaders
 
string m_XmlData
 
AppException m_TrackingData
 
bool m_IsLast
 
bool m_TrackMessages
 
FilterChain * m_FilterChain
 

Static Protected Attributes

static void(* m_ManagementCallback )(TransactionStatus::TransactionStatusEnum, void *additionalData) = NULL
 

Private Member Functions

string internalPrepare ()
 
void internalCommit (const string &correlationId)
 
void internalAbort (const string &correlationId)
 
void internalRollback (const string &correlationId)
 
void internalProcess (const string &correlationId)
 
void fireManagementEvent (TransactionStatus::TransactionStatusEnum, const void *additionalData)
 

Private Attributes

unsigned int m_MessageThrottling
 
bool m_FatalError
 
TimeUtil::TimeMarker m_LastReportTime
 

Static Private Attributes

static AppSettings * m_GlobalSettings = NULL
 

Constructor & Destructor Documentation

Endpoint::Endpoint ( )
protected

Configuration options to support future functionality: Sending report MQ message on Abort/Commit

Endpoint::~Endpoint ( )
virtual

Member Function Documentation

virtual void Endpoint::Abort ( )
pure virtual

Aborts the work

Implemented in DbPublisher, MqPublisher, MqFetcher, DbFetcher, FileFetcher, and FilePublisher.

virtual void Endpoint::Commit ( )
pure virtual

Commits the work

Implemented in DbPublisher, MqPublisher, MqFetcher, DbFetcher, FileFetcher, and FilePublisher.

void Endpoint::fireManagementEvent ( TransactionStatus::TransactionStatusEnum  event,
const void *  additionalData 
)
private
BatchManagerBase* Endpoint::getBatchManager ( )
inline
FilterChain* Endpoint::getFilterChain ( )
inline
string Endpoint::getGlobalSetting ( const EndpointConfig::ConfigDirection  prefix,
const EndpointConfig::ConfigSettings  setting,
const string &  defaultValue = "__NODEFAULT" 
) const
protected
AppSettings & Endpoint::getGlobalSettings ( ) const
protected
AbstractStatePersistence * Endpoint::getPersistenceFacility ( )
string Endpoint::getServiceName ( ) const
inlineprotected
pthread_t Endpoint::getThreadId ( )
inline
const pthread_t Endpoint::getThreadId ( ) const
inline
virtual pthread_t Endpoint::getWatcherThreadId ( )
pure virtual
bool Endpoint::haveGlobalSetting ( const EndpointConfig::ConfigDirection  prefix,
const EndpointConfig::ConfigSettings  setting 
) const
protected
virtual void Endpoint::Init ( )
pure virtual
void Endpoint::internalAbort ( const string &  correlationId)
private
void Endpoint::internalCommit ( const string &  correlationId)
private
string Endpoint::internalPrepare ( )
private
void Endpoint::internalProcess ( const string &  correlationId)
private
void Endpoint::internalRollback ( const string &  correlationId)
private
virtual void Endpoint::internalStart ( )
protectedpure virtual
virtual void Endpoint::internalStop ( )
protectedpure virtual
virtual bool Endpoint::moreMessages ( ) const
inlinevirtual
bool Endpoint::PerformMessageLoop ( )
bool Endpoint::PerformMessageLoop ( bool  inBatch)
virtual string Endpoint::Prepare ( )
pure virtual

Make an engagement whether it can/can't process the data

Returns
A transaction key

Implemented in DbPublisher, MqPublisher, MqFetcher, DbFetcher, FileFetcher, and FilePublisher.

virtual void Endpoint::Process ( const string &  correlationId)
pure virtual

Processes the data

Returns
True if everything worked fine

Implemented in DbPublisher, MqPublisher, DbFetcher, MqFetcher, FileFetcher, and FilePublisher.

virtual void Endpoint::Rollback ( )
pure virtual

Rolls back the data

Implemented in DbPublisher, MqPublisher, DbFetcher, MqFetcher, FileFetcher, and FilePublisher.

void Endpoint::setCorrelationId ( const string &  correlationId)
protected
static void Endpoint::setGlobalSettings ( AppSettings *  settings)
inlinestatic
static void Endpoint::setManagementCallback ( void(*)(TransactionStatus::TransactionStatusEnum, void *)  callback)
inlinestatic
void Endpoint::setPersistenceFacility ( AbstractStatePersistence *  facility)
void Endpoint::setServiceName ( const string &  value)
inline
void Endpoint::setServiceThreadId ( const string &  serviceThreadId)
inline
void Endpoint::Start ( )
void * Endpoint::StartInNewThread ( void *  pThis)
static
void Endpoint::Stop ( )
void Endpoint::trackMessage ( const string &  payload,
const NameValueCollection &  transportHeaders 
)
virtual

Member Data Documentation

unsigned int Endpoint::m_BackoutCount
protected
BatchManagerBase* Endpoint::m_BatchManager
protected
string Endpoint::m_CorrelationId
protected
unsigned int Endpoint::m_CrtBatchItem
protected
unsigned int Endpoint::m_CurrentStage
protected
bool Endpoint::m_FatalError
private
FilterChain* Endpoint::m_FilterChain
protected
AppSettings * Endpoint::m_GlobalSettings = NULL
staticprivate
bool Endpoint::m_IsLast
protected
string Endpoint::m_LastFailureCorrelationId
protected
bool Endpoint::m_LastOpSucceeded
protected
TimeUtil::TimeMarker Endpoint::m_LastReportTime
private
void(* Endpoint::m_ManagementCallback)(TransactionStatus::TransactionStatusEnum, void *additionalData) = NULL
staticprotected
unsigned int Endpoint::m_MessageThrottling
private
AbstractWatcher::NotificationPool Endpoint::m_NotificationPool
protected
AbstractStatePersistence* Endpoint::m_PersistenceFacility
protected
bool Endpoint::m_Running
protected
pthread_t Endpoint::m_SelfThreadId
protected
string Endpoint::m_ServiceName
protected
string Endpoint::m_ServiceThreadId
protected
AppException Endpoint::m_TrackingData
protected
bool Endpoint::m_TrackMessages
protected
string Endpoint::m_TransactionKey
protected
NameValueCollection Endpoint::m_TransportHeaders
protected
string Endpoint::m_XmlData
protected

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