Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 1 | #ifndef T_SERVER_H |
| 2 | #define T_SERVER_H |
| 3 | |
Mark Slee | 8d7e1f6 | 2006-06-07 06:48:56 +0000 | [diff] [blame] | 4 | #include "TProcessor.h" |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 5 | |
Marc Slemko | 6f038a7 | 2006-08-03 18:58:09 +0000 | [diff] [blame^] | 6 | namespace facebook { namespace thrift { namespace server { |
| 7 | |
| 8 | using namespace facebook::thrift; |
| 9 | |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 10 | class TServerOptions; |
| 11 | |
| 12 | /** |
| 13 | * Thrift server. |
| 14 | * |
| 15 | * @author Mark Slee <mcslee@facebook.com> |
| 16 | */ |
| 17 | class TServer { |
| 18 | public: |
| 19 | virtual ~TServer() {} |
| 20 | virtual void run() = 0; |
| 21 | |
| 22 | protected: |
Mark Slee | 8d7e1f6 | 2006-06-07 06:48:56 +0000 | [diff] [blame] | 23 | TServer(TProcessor* processor, TServerOptions* options) : |
| 24 | processor_(processor), options_(options) {} |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 25 | |
Mark Slee | 8d7e1f6 | 2006-06-07 06:48:56 +0000 | [diff] [blame] | 26 | TProcessor* processor_; |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 27 | TServerOptions* options_; |
| 28 | }; |
| 29 | |
| 30 | /** |
| 31 | * Class to encapsulate all generic server options. |
| 32 | */ |
| 33 | class TServerOptions { |
| 34 | public: |
| 35 | // TODO(mcslee): Fill in getters/setters here |
| 36 | protected: |
| 37 | // TODO(mcslee): Fill data members in here |
| 38 | }; |
| 39 | |
Marc Slemko | 6f038a7 | 2006-08-03 18:58:09 +0000 | [diff] [blame^] | 40 | }}} // facebook::thrift::server |
| 41 | |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 42 | #endif |