/home/gomez/Documents/workspaces/treqs/treqs/src/treqs.cpp File Reference

#include <stdlib.h>
#include <unistd.h>
#include <fstream>
#include <csignal>
#include "anyoption.h"
#include "TreqsConfig.h"
#include "Exceptions.h"
#include "Dispatcher.h"
#include "Activator.h"
#include "log4cxx/logger.h"
#include "log4cxx/basicconfigurator.h"
#include "log4cxx/helpers/exception.h"
#include "log4cxx/propertyconfigurator.h"
Include dependency graph for treqs.cpp:

Functions

LoggerPtr logger (Logger::getLogger("TReqS"))
void sig_custom (int sig)
void sig_terminate (int sig)
 Do all the necessary cleanup before ending program.
void sig_reload_config (int sig)
int main (int argc, char **argv)

Variables

treqs::Dispatcher myDispatcher
treqs::Activator myActivator
volatile std::sig_atomic_t interruption
 This is the signal.

Function Documentation

LoggerPtr logger ( Logger::  getLogger"TReqS"  ) 

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

This is the main function. Get the configuration parameters, spawns the dispatcher and the activator. TReqS reacts to the following signals :

  • USR1 : reload the configuration parameters
  • TERM : exit nicely
Parameters:
argc the number of arguments
argv the list of arguments
Returns:

Here is the call graph for this function:

void sig_custom ( int  sig  ) 

Here is the call graph for this function:

void sig_reload_config ( int  sig  ) 

This functions reload the configuration file and updates the parameters. The parameters wich can be hot-set are :

  • [MAIN]:DISPATCHER_INTERVAL
  • [MAIN]:ACTIVATOR_INTERVAL
  • [MAIN]:QUEUE_SUSPEND_TIME
Parameters:
sig 

Here is the call graph for this function:

Here is the caller graph for this function:

void sig_terminate ( int  sig  ) 

Do all the necessary cleanup before ending program.

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

volatile std::sig_atomic_t interruption

This is the signal.


Generated on 4 Mar 2010 for TReqS by  doxygen 1.6.1