log4cplus
2.1.0
|
This class is used by SocketAppender and (remote) SysLogAppender to provide asynchronous re-connection. More...
#include <connectorthread.h>
Public Member Functions | |
ConnectorThread (IConnectorThreadClient &client) | |
virtual | ~ConnectorThread () |
virtual void | run () |
void | terminate () |
Call this function to terminate ConnectorThread. More... | |
void | trigger () |
This function triggers (trigger_ev ) connection check and attempt to re-connect a broken connection, when necessary. More... | |
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 More... | |
thread::ManualResetEvent | trigger_ev |
This event is the re-connection trigger. More... | |
bool | exit_flag |
When this variable set to true when ConnectorThread is signaled to. More... | |
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 |
This class is used by SocketAppender and (remote) SysLogAppender to provide asynchronous re-connection.
Definition at line 72 of file connectorthread.h.
log4cplus::helpers::ConnectorThread::ConnectorThread | ( | IConnectorThreadClient & | client | ) |
client | reference to ConnectorThread's client object |
|
virtual |
|
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.
|
protected |
reference to ConnectorThread's client
Definition at line 93 of file connectorthread.h.
|
protected |
When this variable set to true when ConnectorThread is signaled to.
Definition at line 99 of file connectorthread.h.
|
protected |
This event is the re-connection trigger.
Definition at line 96 of file connectorthread.h.