22 #ifndef CLIENTHANDLER_H_
23 #define CLIENTHANDLER_H_
36 class ApiServerInterface;
44 virtual void run() = 0;
45 virtual void finally() = 0;
60 API_STATUS_CONTINUE = 100,
62 API_STATUS_CREATED = 201,
63 API_STATUS_ACCEPTED = 202,
64 API_STATUS_FOUND = 302,
65 API_STATUS_BAD_REQUEST = 400,
66 API_STATUS_UNAUTHORIZED = 401,
67 API_STATUS_FORBIDDEN = 403,
68 API_STATUS_NOT_FOUND = 404,
69 API_STATUS_NOT_ALLOWED = 405,
70 API_STATUS_NOT_ACCEPTABLE = 406,
71 API_STATUS_CONFLICT = 409,
72 API_STATUS_INTERNAL_ERROR = 500,
73 API_STATUS_NOT_IMPLEMENTED = 501,
74 API_STATUS_SERVICE_UNAVAILABLE = 503,
75 API_STATUS_VERSION_NOT_SUPPORTED = 505
93 void setup() throw ();
97 void error(STATUS_CODES code, const std::
string &msg);
98 void processCommand(const std::vector<std::
string> &cmd);
102 ibrcommon::Mutex _write_lock;
103 ibrcommon::socketstream *_stream;
104 dtn::data::EID _endpoint;
116 virtual Registration& getRegistration(
const std::string &handle) = 0;