log4cplus  2.0.0
Public Member Functions | Protected Attributes
log4cplus::helpers::ConnectorThread Class Reference

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

#include <connectorthread.h>

Inheritance diagram for log4cplus::helpers::ConnectorThread:
[legend]
Collaboration diagram for log4cplus::helpers::ConnectorThread:
[legend]

List of all members.

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.

Protected Attributes

IConnectorThreadClientctc
 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.

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

Parameters:
clientreference to ConnectorThread's client object

Member Function Documentation

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

Call this function to terminate ConnectorThread.

The function sets `exit_flag` and then triggers `trigger_ev` to wake up the ConnectorThread.

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


Member Data Documentation

reference to ConnectorThread's client

Definition at line 93 of file connectorthread.h.

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

Definition at line 99 of file connectorthread.h.

This event is the re-connection trigger.

Definition at line 96 of file connectorthread.h.


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