OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BFD::RESTServer Class Reference

#include <bfd_rest_server.h>

Collaboration diagram for BFD::RESTServer:

Classes

class  HandlerSpecifier
 
struct  RESTData
 

Public Member Functions

 RESTServer (Server *bfd_server)
 
 ~RESTServer ()
 
void HandleRequest (HttpSession *session, const HttpRequest *request)
 

Protected Types

typedef std::map< ClientId,
RESTClientSession * > 
ClientMap
 

Protected Member Functions

ClientId UniqClientId ()
 
RESTClientSessionGetClientSession (ClientId client_id, HttpSession *session)
 
void CreateRESTClientSession (HttpSession *session, const HttpRequest *request)
 
void DeleteRESTClientSession (ClientId client_id, HttpSession *session, const HttpRequest *request)
 
void CreateBFDConnection (ClientId client_id, HttpSession *session, const HttpRequest *request)
 
void GetBFDConnection (ClientId client_id, const boost::asio::ip::address &ip, HttpSession *session, const HttpRequest *request)
 
void DeleteBFDConnection (ClientId client_id, const boost::asio::ip::address &ip, HttpSession *session, const HttpRequest *request)
 
void MonitorRESTClientSession (ClientId client_id, HttpSession *session, const HttpRequest *request)
 
void SessionHandler (const struct RESTData &)
 
void ClientHandler (const struct RESTData &)
 
void ClientIPConnectionHandler (const struct RESTData &)
 
void ClientIPAddressHandlerGet (const struct RESTData &)
 
void ClientIPAddressHandlerDelete (const struct RESTData &)
 
void ClientMonitorHandler (const struct RESTData &)
 

Protected Attributes

ClientMap client_sessions_
 
Serverbfd_server_
 
tbb::mutex mutex_
 

Static Protected Attributes

static const std::vector
< HandlerSpecifier
RESTHandlers_
 

Detailed Description

Definition at line 20 of file bfd_rest_server.h.

Member Typedef Documentation

typedef std::map<ClientId, RESTClientSession *> BFD::RESTServer::ClientMap
protected

Definition at line 28 of file bfd_rest_server.h.

Constructor & Destructor Documentation

BFD::RESTServer::RESTServer ( Server bfd_server)
explicit

Definition at line 103 of file bfd_rest_server.cc.

BFD::RESTServer::~RESTServer ( )

Definition at line 276 of file bfd_rest_server.cc.

Member Function Documentation

void BFD::RESTServer::ClientHandler ( const struct RESTData data)
protected

Definition at line 37 of file bfd_rest_server.cc.

Here is the call graph for this function:

void BFD::RESTServer::ClientIPAddressHandlerDelete ( const struct RESTData data)
protected

Definition at line 57 of file bfd_rest_server.cc.

Here is the call graph for this function:

void BFD::RESTServer::ClientIPAddressHandlerGet ( const struct RESTData data)
protected

Definition at line 49 of file bfd_rest_server.cc.

Here is the call graph for this function:

void BFD::RESTServer::ClientIPConnectionHandler ( const struct RESTData data)
protected

Definition at line 43 of file bfd_rest_server.cc.

Here is the call graph for this function:

void BFD::RESTServer::ClientMonitorHandler ( const struct RESTData data)
protected

Definition at line 66 of file bfd_rest_server.cc.

Here is the call graph for this function:

void BFD::RESTServer::CreateBFDConnection ( ClientId  client_id,
HttpSession session,
const HttpRequest request 
)
protected

Definition at line 148 of file bfd_rest_server.cc.

Here is the call graph for this function:

void BFD::RESTServer::CreateRESTClientSession ( HttpSession session,
const HttpRequest request 
)
protected

Definition at line 118 of file bfd_rest_server.cc.

Here is the call graph for this function:

void BFD::RESTServer::DeleteBFDConnection ( ClientId  client_id,
const boost::asio::ip::address &  ip,
HttpSession session,
const HttpRequest request 
)
protected

Definition at line 211 of file bfd_rest_server.cc.

Here is the call graph for this function:

void BFD::RESTServer::DeleteRESTClientSession ( ClientId  client_id,
HttpSession session,
const HttpRequest request 
)
protected

Definition at line 134 of file bfd_rest_server.cc.

Here is the call graph for this function:

void BFD::RESTServer::GetBFDConnection ( ClientId  client_id,
const boost::asio::ip::address &  ip,
HttpSession session,
const HttpRequest request 
)
protected

Definition at line 177 of file bfd_rest_server.cc.

Here is the call graph for this function:

RESTClientSession * BFD::RESTServer::GetClientSession ( ClientId  client_id,
HttpSession session 
)
protected

Definition at line 107 of file bfd_rest_server.cc.

Here is the call graph for this function:

void BFD::RESTServer::HandleRequest ( HttpSession session,
const HttpRequest request 
)

Definition at line 239 of file bfd_rest_server.cc.

Here is the call graph for this function:

void BFD::RESTServer::MonitorRESTClientSession ( ClientId  client_id,
HttpSession session,
const HttpRequest request 
)
protected

Definition at line 228 of file bfd_rest_server.cc.

Here is the call graph for this function:

void BFD::RESTServer::SessionHandler ( const struct RESTData data)
protected

Definition at line 33 of file bfd_rest_server.cc.

Here is the call graph for this function:

ClientId BFD::RESTServer::UniqClientId ( )
protected

Definition at line 267 of file bfd_rest_server.cc.

Member Data Documentation

Server* BFD::RESTServer::bfd_server_
protected

Definition at line 83 of file bfd_rest_server.h.

ClientMap BFD::RESTServer::client_sessions_
protected

Definition at line 82 of file bfd_rest_server.h.

tbb::mutex BFD::RESTServer::mutex_
protected

Definition at line 84 of file bfd_rest_server.h.

const std::vector< RESTServer::HandlerSpecifier > BFD::RESTServer::RESTHandlers_
staticprotected
Initial value:
=
boost::assign::list_of
(HandlerSpecifier(
regex("/Session"),
HTTP_PUT,
(HandlerSpecifier(
regex("/Session/([[:digit:]]{1,9})"),
HTTP_DELETE,
(HandlerSpecifier(
regex("/Session/([[:digit:]]{1,9})/IpConnection"),
HTTP_PUT,
(HandlerSpecifier(
regex("/Session/([[:digit:]]{1,9})/IpConnection/"
"([[:digit:]]{1,3}\\.[[:digit:]]{1,3}\\."
"[[:digit:]]{1,3}\\.[[:digit:]]{1,3})"),
HTTP_GET,
(HandlerSpecifier(
regex("/Session/([[:digit:]]{1,9})/IpConnection/"
"([[:digit:]]{1,3}\\.[[:digit:]]{1,3}\\."
"[[:digit:]]{1,3}\\.[[:digit:]]{1,3})"),
HTTP_DELETE,
(HandlerSpecifier(
regex("/Session/([[:digit:]]{1,9})/Monitor"),
HTTP_GET,

Definition at line 73 of file bfd_rest_server.h.


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