fintp_connectors
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
FileFetcher Class Reference

#include <FileFetcher.h>

Inheritance diagram for FileFetcher:

Public Member Functions

 FileFetcher ()
 
 ~FileFetcher ()
 
void Init ()
 
string Prepare ()
 Make an engagement whether it can/can't process the data More...
 
void Commit ()
 Commits the work More...
 
void Abort ()
 Aborts the work and rolls back the data More...
 
void Rollback ()
 Rollback More...
 
void Process (const string &correlationId)
 Processes the data More...
 
bool moreMessages () const
 
pthread_t getWatcherThreadId ()
 
string getWatchPath () const
 
string Serialize (XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, const string &xsltFilename, const string &paramFilename, const long paramFileSize, const string &HMAC="")
 
- Public Member Functions inherited from Endpoint
virtual ~Endpoint ()
 
void Start ()
 
void Stop ()
 
bool PerformMessageLoop ()
 
bool PerformMessageLoop (bool inBatch)
 
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
 
FilterChain * getFilterChain ()
 
BatchManagerBase * getBatchManager ()
 

Static Public Member Functions

static void NotificationCallback (const AbstractWatcher::NotificationObject *notification)
 
- Static Public Member Functions inherited from Endpoint
static void * StartInNewThread (void *)
 
static void setManagementCallback (void(*callback)(TransactionStatus::TransactionStatusEnum, void *))
 
static void setGlobalSettings (AppSettings *settings)
 

Protected Member Functions

void internalStart ()
 
void internalStop ()
 
void FinalMove (string &finalPath)
 
- Protected Member Functions inherited from Endpoint
 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
 

Private Attributes

BatchItem m_LastBatchItem
 
FsWatcher m_Watcher
 
string m_CurrentFilename
 
string m_CurrentBatchId
 
ifstream m_CurrentFile
 
unsigned long m_CurrentFileSize
 
string m_ReconSource
 
string m_WatchPath
 
string m_SuccessPath
 
string m_ErrorPath
 
string m_BatchXsltFile
 

Static Private Attributes

static int m_PrevBatchItem = -1
 
static FileFetcherm_Me = NULL
 

Additional Inherited Members

- Protected Attributes inherited from Endpoint
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 inherited from Endpoint
static void(* m_ManagementCallback )(TransactionStatus::TransactionStatusEnum, void *additionalData) = NULL
 

Constructor & Destructor Documentation

FileFetcher::FileFetcher ( )
FileFetcher::~FileFetcher ( )

Member Function Documentation

void FileFetcher::Abort ( )
virtual

Aborts the work and rolls back the data

!!!!!!!cine face rollback la filtru mq

Implements Endpoint.

void FileFetcher::Commit ( )
virtual

Commits the work

Implements Endpoint.

void FileFetcher::FinalMove ( string &  finalPath)
protected
pthread_t FileFetcher::getWatcherThreadId ( )
inlinevirtual

Implements Endpoint.

string FileFetcher::getWatchPath ( ) const
inline
void FileFetcher::Init ( )
virtual

Implements Endpoint.

void FileFetcher::internalStart ( )
protectedvirtual

Implements Endpoint.

void FileFetcher::internalStop ( )
protectedvirtual

Implements Endpoint.

bool FileFetcher::moreMessages ( ) const
virtual

Reimplemented from Endpoint.

void FileFetcher::NotificationCallback ( const AbstractWatcher::NotificationObject *  notification)
static
string FileFetcher::Prepare ( )
virtual

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

Returns
CurrentFileName if it can process the data

Implements Endpoint.

void FileFetcher::Process ( const string &  correlationId)
virtual

Processes the data

Returns
True if everything worked fine

Implements Endpoint.

void FileFetcher::Rollback ( )
virtual

Rollback

Implements Endpoint.

string FileFetcher::Serialize ( XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *  doc,
const string &  xsltFilename,
const string &  paramFilename,
const long  paramFileSize,
const string &  HMAC = "" 
)

Member Data Documentation

string FileFetcher::m_BatchXsltFile
private
string FileFetcher::m_CurrentBatchId
private
ifstream FileFetcher::m_CurrentFile
private
string FileFetcher::m_CurrentFilename
private
unsigned long FileFetcher::m_CurrentFileSize
private
string FileFetcher::m_ErrorPath
private
BatchItem FileFetcher::m_LastBatchItem
private
FileFetcher * FileFetcher::m_Me = NULL
staticprivate
int FileFetcher::m_PrevBatchItem = -1
staticprivate
string FileFetcher::m_ReconSource
private
string FileFetcher::m_SuccessPath
private
FsWatcher FileFetcher::m_Watcher
private
string FileFetcher::m_WatchPath
private

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