top | up | prev | next

Connection Abstract Class

Definition at line 16 of Connection.hpp

Constructors

Connection(Log* log_)

Member Functions

void Close()
void DoClose() pure virtual
std::unique_ptr<JsonObject> DoReceive() pure virtual
void DoSend(JsonObject* messageObject) pure virtual
const std::string& GetActor() const pure virtual
Host* GetHost() const pure virtual
Log* GetLog() const
std::unique_ptr<MessageBase> Receive()
void Send(JsonObject* messageObject)
bool ServerAlive() const
void SetServer(BuildServer* server_)
void SetServerAlive(bool alive)

Member Variables

Log* log
BuildServer* server
bool serverAlive

Constructor Details

Connection Constructor

cmajor::build::Connection::Connection(Log * log_)

Definition at line 16 of Connection.cpp :
16 : log(log_)serverAlive(false)server(nullptr)
17 {
18 }


Declaration at line 19 of Connection.hpp


Member Function Details

Close Member Function

void cmajor::build::Connection::Close()

Definition at line 53 of Connection.cpp
Declaration at line 25 of Connection.hpp

Calls: cmajor::build::Connection::DoClose , cmajor::build::Connection::GetActor , cmajor::build::Log::Write

Called by: cmajor::build::BuildProjectClientCommand::Execute , cmajor::build::PushProjectClientCommand::Execute , cmajor::build::SocketConnection::DoClose


DoClose Member Function

void cmajor::build::Connection::DoClose() pure virtual

Definition at line 26 of Connection.hpp

Derived class overrides: cmajor::build::FiberConnection::DoClose , cmajor::build::SocketConnection::DoClose

Called by: cmajor::build::Connection::Close


DoReceive Member Function

std::unique_ptr<JsonObject> cmajor::build::Connection::DoReceive() pure virtual

Definition at line 24 of Connection.hpp

Derived class overrides: cmajor::build::FiberConnection::DoReceive , cmajor::build::SocketConnection::DoReceive

Called by: cmajor::build::Connection::Receive


DoSend Member Function

void cmajor::build::Connection::DoSend(JsonObject* messageObject) pure virtual

Definition at line 22 of Connection.hpp

Derived class overrides: cmajor::build::FiberConnection::DoSend , cmajor::build::SocketConnection::DoSend

Called by: cmajor::build::Connection::Send


GetActor Member Function

const std::string& cmajor::build::Connection::GetActor() const pure virtual

Definition at line 28 of Connection.hpp

Derived class overrides: cmajor::build::FiberConnection::GetActor , cmajor::build::SocketConnection::GetActor

Called by: cmajor::build::Connection::Close , cmajor::build::Connection::Receive , cmajor::build::Connection::Send , cmajor::build::Connection::SetServerAlive


GetHost Member Function

Host * cmajor::build::Connection::GetHost() const pure virtual

Definition at line 32 of Connection.hpp

Derived class overrides: cmajor::build::FiberConnection::GetHost , cmajor::build::SocketConnection::GetHost


GetLog Member Function

Log * cmajor::build::Connection::GetLog() const

Definition at line 27 of Connection.hpp :
27 { return log; }

Called by: cmajor::build::ClientExecutionContext::destructor , cmajor::build::LocalExecutionContext::destructor


Receive Member Function

std::unique_ptr<MessageBase> cmajor::build::Connection::Receive()

Definition at line 34 of Connection.cpp
Declaration at line 23 of Connection.hpp

Calls: cmajor::build::Connection::DoReceive , cmajor::build::Connection::GetActor , cmajor::build::Log::Write


Send Member Function

void cmajor::build::Connection::Send(JsonObject * messageObject)

Definition at line 24 of Connection.cpp :
25 {
26     if (log)
27     {
28         const std::string& actor = GetActor();
29         log->Write(actor + ": send: "messageObject);
30     }
31     DoSend(messageObject);
32 }


Calls: cmajor::build::Connection::DoSend , cmajor::build::Connection::GetActor , cmajor::build::Log::Write


ServerAlive Member Function

bool cmajor::build::Connection::ServerAlive() const

Definition at line 29 of Connection.hpp :
29 { return serverAlive; }

Called by: cmajor::build::BuildProjectClientCommand::Execute , cmajor::build::ClientExecutionContext::destructor , cmajor::build::LocalExecutionContext::destructor , cmajor::build::PushProjectClientCommand::Execute


SetServer Member Function

void cmajor::build::Connection::SetServer(BuildServer* server_)

Definition at line 31 of Connection.hpp :
31 { server = server_; }


SetServerAlive Member Function

void cmajor::build::Connection::SetServerAlive(bool alive)

Definition at line 67 of Connection.cpp :
68 {
69     serverAlive = alive;
70     if (log)
71     {
72         const std::string& actor = GetActor();
73         log->Write(actor + ": alive = " + BoolStr(alive) + "\n"nullptr);
74     }
75 }


Declaration at line 30 of Connection.hpp

Calls: cmajor::build::Connection::GetActor , cmajor::build::Log::Write

Called by: cmajor::build::BuildProjectClientCommand::Execute , cmajor::build::ClientExecutionContext::destructor , cmajor::build::LocalExecutionContext::destructor , cmajor::build::PushProjectClientCommand::Execute


top | up | prev | next