IBR-DTN  1.0.0
dtn::api::ClientHandler Class Reference

#include <ClientHandler.h>

Inheritance diagram for dtn::api::ClientHandler:
Inheritance graph
Collaboration diagram for dtn::api::ClientHandler:
Collaboration graph

Public Types

enum  STATUS_CODES {
  API_STATUS_CONTINUE = 100, API_STATUS_OK = 200, API_STATUS_CREATED = 201, API_STATUS_ACCEPTED = 202,
  API_STATUS_FOUND = 302, API_STATUS_BAD_REQUEST = 400, API_STATUS_UNAUTHORIZED = 401, API_STATUS_FORBIDDEN = 403,
  API_STATUS_NOT_FOUND = 404, API_STATUS_NOT_ALLOWED = 405, API_STATUS_NOT_ACCEPTABLE = 406, API_STATUS_CONFLICT = 409,
  API_STATUS_INTERNAL_ERROR = 500, API_STATUS_NOT_IMPLEMENTED = 501, API_STATUS_SERVICE_UNAVAILABLE = 503, API_STATUS_VERSION_NOT_SUPPORTED = 505
}
 

Public Member Functions

 ClientHandler (ApiServerInterface &srv, Registration &registration, ibrcommon::socketstream *conn)
 
virtual ~ClientHandler ()
 
RegistrationgetRegistration ()
 
ApiServerInterfacegetAPIServer ()
 
void switchRegistration (Registration &reg)
 

Protected Member Functions

void run () throw ()
 
void finally () throw ()
 
void setup () throw ()
 
void __cancellation () throw ()
 

Detailed Description

Definition at line 55 of file ClientHandler.h.

Member Enumeration Documentation

Enumerator
API_STATUS_CONTINUE 
API_STATUS_OK 
API_STATUS_CREATED 
API_STATUS_ACCEPTED 
API_STATUS_FOUND 
API_STATUS_BAD_REQUEST 
API_STATUS_UNAUTHORIZED 
API_STATUS_FORBIDDEN 
API_STATUS_NOT_FOUND 
API_STATUS_NOT_ALLOWED 
API_STATUS_NOT_ACCEPTABLE 
API_STATUS_CONFLICT 
API_STATUS_INTERNAL_ERROR 
API_STATUS_NOT_IMPLEMENTED 
API_STATUS_SERVICE_UNAVAILABLE 
API_STATUS_VERSION_NOT_SUPPORTED 

Definition at line 58 of file ClientHandler.h.

Constructor & Destructor Documentation

dtn::api::ClientHandler::ClientHandler ( ApiServerInterface srv,
Registration registration,
ibrcommon::socketstream *  conn 
)

Definition at line 48 of file ClientHandler.cpp.

dtn::api::ClientHandler::~ClientHandler ( )
virtual

Definition at line 53 of file ClientHandler.cpp.

Member Function Documentation

void dtn::api::ClientHandler::__cancellation ( )
throw (
)
protected

Definition at line 194 of file ClientHandler.cpp.

void dtn::api::ClientHandler::finally ( )
throw (
)
protected
ApiServerInterface & dtn::api::ClientHandler::getAPIServer ( )

Definition at line 63 of file ClientHandler.cpp.

Referenced by dtn::api::ExtendedApiHandler::run().

void dtn::api::ClientHandler::setup ( )
throw (
)
protected

Definition at line 77 of file ClientHandler.cpp.

void dtn::api::ClientHandler::switchRegistration ( Registration reg)

swaps the active registration of this client with the given one

Parameters
regthe new registration

Definition at line 68 of file ClientHandler.cpp.

References dtn::api::Registration::abort(), and dtn::api::ApiServerInterface::freeRegistration().

Referenced by dtn::api::ExtendedApiHandler::run().

Here is the call graph for this function:


The documentation for this class was generated from the following files: