OpenSDN source code
|
#include <sandesh_connection.h>
Public Types | |
typedef boost::asio::ip::tcp::endpoint | Endpoint |
Public Member Functions | |
SandeshConnection (const char *prefix, TcpServer *server, Endpoint endpoint, int task_instance, int task_id) | |
virtual | ~SandeshConnection () |
void | AcceptSession (SandeshSession *session) |
virtual bool | ReceiveMsg (const std::string &msg, SandeshSession *session) |
TcpServer * | server () |
Endpoint | endpoint () |
bool | SendSandesh (Sandesh *snh) |
void | set_session (SandeshSession *session) |
SandeshSession * | session () const |
SandeshStateMachine * | state_machine () const |
std::string | StateName () const |
int | GetTaskInstance () const |
int | GetTaskId () const |
void | Initialize () |
void | Shutdown () |
bool | MayDelete () const |
void | SetAdminState (bool down) |
virtual bool | ProcessResourceUpdate (bool res) |
virtual bool | ProcessSandeshMessage (const SandeshMessage *msg, bool resource)=0 |
virtual bool | ProcessSandeshCtrlMessage (const std::string &msg, const SandeshHeader &header, const std::string sandesh_name, const uint32_t header_offset)=0 |
virtual void | ProcessDisconnect (SandeshSession *sess)=0 |
virtual void | ManagedDelete ()=0 |
virtual LifetimeActor * | deleter ()=0 |
virtual LifetimeManager * | lifetime_manager ()=0 |
virtual void | Destroy ()=0 |
Protected Attributes | |
bool | is_deleted_ |
Private Member Functions | |
DISALLOW_COPY_AND_ASSIGN (SandeshConnection) | |
Private Attributes | |
TcpServer * | server_ |
Endpoint | endpoint_ |
bool | admin_down_ |
SandeshSession * | session_ |
int | task_instance_ |
int | task_id_ |
boost::scoped_ptr < SandeshStateMachine > | state_machine_ |
Friends | |
class | SandeshServerStateMachineTest |
Definition at line 28 of file sandesh_connection.h.
typedef boost::asio::ip::tcp::endpoint SandeshConnection::Endpoint |
Definition at line 30 of file sandesh_connection.h.
SandeshConnection::SandeshConnection | ( | const char * | prefix, |
TcpServer * | server, | ||
Endpoint | endpoint, | ||
int | task_instance, | ||
int | task_id | ||
) |
Definition at line 49 of file sandesh_connection.cc.
|
virtual |
Definition at line 61 of file sandesh_connection.cc.
void SandeshConnection::AcceptSession | ( | SandeshSession * | session | ) |
|
pure virtual |
Implemented in SandeshServerConnection.
|
pure virtual |
Implemented in SandeshServerConnection.
|
private |
|
inline |
Definition at line 41 of file sandesh_connection.h.
|
inline |
Definition at line 56 of file sandesh_connection.h.
|
inline |
Definition at line 51 of file sandesh_connection.h.
|
inline |
Definition at line 60 of file sandesh_connection.h.
|
pure virtual |
Implemented in SandeshServerConnection.
|
pure virtual |
Implemented in SandeshServerConnection.
bool SandeshConnection::MayDelete | ( | ) | const |
Definition at line 114 of file sandesh_connection.cc.
|
pure virtual |
Implemented in SandeshServerConnection.
|
inlinevirtual |
Reimplemented in SandeshServerConnection.
Definition at line 69 of file sandesh_connection.h.
|
pure virtual |
Implemented in SandeshServerConnection.
|
pure virtual |
Implemented in SandeshServerConnection.
|
virtual |
Definition at line 72 of file sandesh_connection.cc.
bool SandeshConnection::SendSandesh | ( | Sandesh * | snh | ) |
|
inline |
Definition at line 39 of file sandesh_connection.h.
SandeshSession * SandeshConnection::session | ( | ) | const |
Definition at line 68 of file sandesh_connection.cc.
void SandeshConnection::set_session | ( | SandeshSession * | session | ) |
void SandeshConnection::SetAdminState | ( | bool | down | ) |
Definition at line 102 of file sandesh_connection.cc.
void SandeshConnection::Shutdown | ( | void | ) |
SandeshStateMachine * SandeshConnection::state_machine | ( | ) | const |
Definition at line 98 of file sandesh_connection.cc.
|
inline |
Definition at line 49 of file sandesh_connection.h.
|
friend |
Definition at line 86 of file sandesh_connection.h.
|
private |
Definition at line 90 of file sandesh_connection.h.
|
private |
Definition at line 89 of file sandesh_connection.h.
|
protected |
Definition at line 83 of file sandesh_connection.h.
|
private |
Definition at line 88 of file sandesh_connection.h.
|
private |
Definition at line 91 of file sandesh_connection.h.
|
private |
Definition at line 94 of file sandesh_connection.h.
|
private |
Definition at line 93 of file sandesh_connection.h.
|
private |
Definition at line 92 of file sandesh_connection.h.