log4cplus_helpers_ConnectorThread(3)

log4cplus::helpers::ConnectorThread(3) log4cplus log4cplus::helpers::ConnectorThread(3)

NAME

log4cplus::helpers::ConnectorThread - This class is used by SocketAppender and (remote) SysLogAppender to provide asynchronous re-connection.

SYNOPSIS

#include <connectorthread.h>

Inherits log4cplus::thread::AbstractThread.

Public Member Functions


ConnectorThread (IConnectorThreadClient &client)
virtual ~ConnectorThread ()
virtual void run ()
void terminate ()
Call this function to terminate ConnectorThread. void trigger ()
This function triggers (trigger_ev) connection check and attempt to re-connect a broken connection, when necessary.

Public Member Functions inherited from log4cplus::thread::AbstractThread
AbstractThread ()
AbstractThread (const AbstractThread &)=delete
AbstractThread & operator= (const AbstractThread &)=delete
bool isRunning () const
virtual void start ()
void join () const

Public Member Functions inherited from log4cplus::helpers::SharedObject
void addReference () const LOG4CPLUS_NOEXCEPT
void removeReference () const

Protected Attributes


IConnectorThreadClient & ctc
reference to ConnectorThread's client thread::ManualResetEvent trigger_ev
This event is the re-connection trigger. bool exit_flag
When this variable set to true when ConnectorThread is signaled to.

Additional Inherited Members

Public Attributes inherited from log4cplus::helpers::SharedObject
thread::Mutex access_mutex

Protected Member Functions inherited from log4cplus::thread::AbstractThread
virtual ~AbstractThread ()

Protected Member Functions inherited from log4cplus::helpers::SharedObject
SharedObject ()
SharedObject (const SharedObject &)
SharedObject (SharedObject &&)
virtual ~SharedObject ()
SharedObject & operator= (const SharedObject &) LOG4CPLUS_NOEXCEPT
SharedObject & operator= (SharedObject &&) LOG4CPLUS_NOEXCEPT

Detailed Description

This class is used by SocketAppender and (remote) SysLogAppender to provide asynchronous re-connection.

Definition at line 72 of file connectorthread.h.

Constructor & Destructor Documentation

log4cplus::helpers::ConnectorThread::ConnectorThread (IConnectorThreadClient & client)

Parameters

client reference to ConnectorThread's client object

virtual log4cplus::helpers::ConnectorThread::~ConnectorThread () [virtual]

Member Function Documentation

virtual void log4cplus::helpers::ConnectorThread::run () [virtual]

Implements log4cplus::thread::AbstractThread.

void log4cplus::helpers::ConnectorThread::terminate ()

Call this function to terminate ConnectorThread. The function sets exit_flag and then triggers trigger_ev to wake up the ConnectorThread.

void log4cplus::helpers::ConnectorThread::trigger ()

This function triggers (trigger_ev) connection check and attempt to re-connect a broken connection, when necessary.

Member Data Documentation

IConnectorThreadClient& log4cplus::helpers::ConnectorThread::ctc [protected]

reference to ConnectorThread's client

Definition at line 93 of file connectorthread.h.

bool log4cplus::helpers::ConnectorThread::exit_flag [protected]

When this variable set to true when ConnectorThread is signaled to.

Definition at line 99 of file connectorthread.h.

thread::ManualResetEvent log4cplus::helpers::ConnectorThread::trigger_ev [protected]

This event is the re-connection trigger.

Definition at line 96 of file connectorthread.h.

Author

Generated automatically by Doxygen for log4cplus from the source code.

Mon Jun 5 2023 21:46:10 Version 2.0.7