# Router Class Reference

Call routing thread. More...

`#include <yatephone.h>`

Inheritance diagram for Router:

List of all members.

## Public Member Functions

| Router (Driver *driver, const char *id, Message *msg)
virtual void | run ()
virtual bool | route ()
virtual void | cleanup ()

## Protected Member Functions

const String & | id () const

## Detailed Description

Call routing thread.

Asynchronous call routing thread

## Constructor & Destructor Documentation

Router | ( | Driver * | driver,
|  | const char * | id,
|  | Message * | msg |
| ) |  |  |

Constructor - creates a new routing thread

Parameters:

  | driver | Pointer to the driver that asked for routing
  | id | Unique identifier of the channel being routed
  | msg | Pointer to an already filled message

## Member Function Documentation

virtual void run | ( |  | ) | `[virtual]`

Main thread running method

Implements Runnable.

virtual bool route | ( |  | ) | `[virtual]`

Actual routing method

Returns:
  True if call was successfully routed

virtual void cleanup | ( |  | ) | `[virtual]`

Thread cleanup handler

Reimplemented from Thread.

const String& id | ( |  | ) | const`[inline, protected]`

Get the routed channel identifier

Returns:
  Unique id of the channel being routed

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

- yatephone.h