glooxd  0.3-svn
Public Member Functions | List of all members
Router Class Reference

#include <router.h>

Inheritance diagram for Router:
Inheritance graph
[legend]

Public Member Functions

 Router (ConfigManager &cm, const gloox::LogSink &logInstance, bool threading=false)
 ~Router ()
void run ()
void registerDomain (TagHandler *th, const std::string &domain, bool node)
virtual void handleDomainAdded (const std::string &)
virtual void handleDomainRemoved (const std::string &)
virtual void handleShutdown ()
- Public Member Functions inherited from TagHandler
virtual ~TagHandler ()
- Public Member Functions inherited from ConfigHandler
virtual ~ConfigHandler ()
virtual bool handleC2SInterfaceAdded (const std::string &interface, int port)
virtual bool handleC2SInterfaceRemoved (const std::string &interface, int port)

Detailed Description

The base class for the routing component.

Author
Jakob Schroeter js@ca.nosp@m.maya.nosp@m..net

Definition at line 43 of file router.h.

Constructor & Destructor Documentation

Router ( ConfigManager cm,
const gloox::LogSink &  logInstance,
bool  threading = false 
)

Instantiates a new object that can be used for local (in-process) routing.

Parameters
cmThe local ConfigManager.
logInstanceThe local LogSink.
threadingWhether this instance runs in its own thread.

Definition at line 33 of file router.cpp.

~Router ( )

Destructor.

Definition at line 39 of file router.cpp.

Member Function Documentation

virtual void handleDomainAdded ( const std::string &  domain)
inlinevirtual

This function is called if a new domain has been added that the server supports.

Parameters
domainThe new domain.

Implements ConfigHandler.

Definition at line 86 of file router.h.

virtual void handleDomainRemoved ( const std::string &  domain)
inlinevirtual

This function is called if a domain has been removed.

Parameters
domainThe removed domain.

Implements ConfigHandler.

Definition at line 89 of file router.h.

void handleShutdown ( )
virtual

This function is called to prepare a server shutdown.

Implements ConfigHandler.

Definition at line 60 of file router.cpp.

void registerDomain ( TagHandler th,
const std::string &  domain,
bool  node 
)

Registers a TagHandler for the given domain. Used internally to route Stanzas to components.

Parameters
thThe TagHandler to register for the given domain.
domainThe domain to route to the given TagHandler.
nodeThe routed JID must posses a node to be routed to this TagHandler.

Definition at line 68 of file router.cpp.

void run ( )

Starts processing incoming events. Blocks if the threading parameter to the constructor is true.

Definition at line 44 of file router.cpp.


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