log4cplus::helpers::ConnectorThread Class Reference

`#include <connectorthread.h>`

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

## Public Member Functions

| ConnectorThread (IConnectorThreadClient &client)
virtual | ~ConnectorThread ()
virtual void | run ()
void | terminate ()
void | trigger ()
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

## ConnectorThread()

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

Parameters

  client | reference to ConnectorThread's client object

## ~ConnectorThread()

virtual log4cplus::helpers::ConnectorThread::~ConnectorThread | ( |  | ) |

virtual

## Member Function Documentation

## run()

virtual void log4cplus::helpers::ConnectorThread::run | ( |  | ) |

virtual

Implements log4cplus::thread::AbstractThread.

## terminate()

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.

## trigger()

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

## ctc

IConnectorThreadClient& log4cplus::helpers::ConnectorThread::ctc

protected

reference to ConnectorThread's client

Definition at line 93 of file connectorthread.h.

## exit_flag

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.

## trigger_ev

thread::ManualResetEvent log4cplus::helpers::ConnectorThread::trigger_ev

protected

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:

- connectorthread.h