00001
00030
#ifndef ORBRUNSTRATEGY_H
00031
#define ORBRUNSTRATEGY_H
00032
00033
#include <exception>
00034
#include <stdexcept>
00035
#include <pthread.h>
00036
#include "BP_CORBA.h"
00037
#include "SysHook.h"
00038
00039
00056 class OrbRunStrategy
00057 {
00058
public:
00061
OrbRunStrategy();
00062
00063
00066
virtual ~OrbRunStrategy();
00067
00090
virtual bool apply(
00091
SysHook* sys_hook,
00092
ConfMap& config
00093 )
00094
throw(std::logic_error,
00095 std::runtime_error,
00096 CORBA::SystemException
00097 );
00098
00106
void interrupt(
bool state);
00107
00115 bool interrupted() {
return(_interrupted); }
00116
00117
00118
protected:
00134
virtual void _apply(
00135
SysHook* sys_hook,
00136 ConfMap& config
00137 )
00138
throw(std::logic_error,
00139 std::runtime_error,
00140 CORBA::SystemException
00141 ) = 0;
00142
00143
00144
private:
00145
volatile bool _interrupted;
00146 pthread_mutex_t _running_mutex;
00147
00148 };
00149
00150
#endif