blob: 0d275ba33c2c3e3ecd1b9641c9e026e49c7e0c2e [file] [log] [blame]
Mark Sleee8540632006-05-30 09:24:40 +00001#ifndef T_SERVER_H
2#define T_SERVER_H
3
Mark Slee8d7e1f62006-06-07 06:48:56 +00004#include "TProcessor.h"
Mark Sleee8540632006-05-30 09:24:40 +00005
6class TServerOptions;
7
8/**
9 * Thrift server.
10 *
11 * @author Mark Slee <mcslee@facebook.com>
12 */
13class TServer {
14 public:
15 virtual ~TServer() {}
16 virtual void run() = 0;
17
18 protected:
Mark Slee8d7e1f62006-06-07 06:48:56 +000019 TServer(TProcessor* processor, TServerOptions* options) :
20 processor_(processor), options_(options) {}
Mark Sleee8540632006-05-30 09:24:40 +000021
Mark Slee8d7e1f62006-06-07 06:48:56 +000022 TProcessor* processor_;
Mark Sleee8540632006-05-30 09:24:40 +000023 TServerOptions* options_;
24};
25
26/**
27 * Class to encapsulate all generic server options.
28 */
29class TServerOptions {
30 public:
31 // TODO(mcslee): Fill in getters/setters here
32 protected:
33 // TODO(mcslee): Fill data members in here
34};
35
36#endif