blob: f34944b24f2710fda8520646b30c250707a96c19 [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
Marc Slemko6f038a72006-08-03 18:58:09 +00006namespace facebook { namespace thrift { namespace server {
7
8using namespace facebook::thrift;
9
Mark Sleee8540632006-05-30 09:24:40 +000010class TServerOptions;
11
12/**
13 * Thrift server.
14 *
15 * @author Mark Slee <mcslee@facebook.com>
16 */
17class TServer {
18 public:
19 virtual ~TServer() {}
20 virtual void run() = 0;
21
22 protected:
Mark Slee8d7e1f62006-06-07 06:48:56 +000023 TServer(TProcessor* processor, TServerOptions* options) :
24 processor_(processor), options_(options) {}
Mark Sleee8540632006-05-30 09:24:40 +000025
Mark Slee8d7e1f62006-06-07 06:48:56 +000026 TProcessor* processor_;
Mark Sleee8540632006-05-30 09:24:40 +000027 TServerOptions* options_;
28};
29
30/**
31 * Class to encapsulate all generic server options.
32 */
33class TServerOptions {
34 public:
35 // TODO(mcslee): Fill in getters/setters here
36 protected:
37 // TODO(mcslee): Fill data members in here
38};
39
Marc Slemko6f038a72006-08-03 18:58:09 +000040}}} // facebook::thrift::server
41
Mark Sleee8540632006-05-30 09:24:40 +000042#endif