Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

CODEX_Server::QuorumBuilderAct Class Reference

This activity attempts to maintain connectivity with other servers in the quorum system. More...

#include <QuorumBuilderAct.h>

Inheritance diagram for CODEX_Server::QuorumBuilderAct:

Inheritance graph
[legend]
Collaboration diagram for CODEX_Server::QuorumBuilderAct:

Collaboration graph
[legend]
List of all members.

Public Methods

 QuorumBuilderAct (CODEX_Events::DeadPileType &deadPile, CODEX_Events::QType &eventQueue)
 The constructor builds the activity and generates a QuorumBuilderEvent.

virtual ~QuorumBuilderAct ()
 Virtual destructor.

bool handler (QuorumBuilderEvent &event)
 Handle a QuorumBuilderEvent.

bool handler (QuorumBuilderExpectNonceEvent &event)
 Handle a QuorumBuilderExpectNonceEvent.


Detailed Description

This activity attempts to maintain connectivity with other servers in the quorum system.

It generates and handles its own event, which acts as a trigger and contains no actual data, aside from enough state to prevent deadlock. Every time the handler is called, it will check for missing servers in the quorum system's list and attempt to contact them. An additional event controls the authentication protocol stages.

Definition at line 39 of file QuorumBuilderAct.h.


Member Function Documentation

bool QuorumBuilderAct::handler QuorumBuilderExpectNonceEvent   event
 

Handle a QuorumBuilderExpectNonceEvent.

This handler waits for the remote server to send a nonce challenge, at which point it computes the response and sends it to the server.

Parameters:
event  The event containing the connection protocol state.
Return values:
true  The remote server has sent the challenge and a suitable response has been returned to it.
false  The remote server has not yet responded.

Definition at line 102 of file QuorumBuilderAct.cc.

References CODEX_Server::ServerState::addQuorumServer(), CODEX_Quorum::Message::buffer(), CODEX_Server::QuorumBuilderExpectNonceEvent::buffer(), CODEX_Quorum::Message::fill(), CODEX_Server::ServerState::hashFunc(), CODEX_Server::ServerState::hostNum(), CODEX_Server::QuorumBuilderExpectNonceEvent::hostNum(), CODEX_ASN1::Base::initialized(), CODEX_Quorum::RemoteServer::isset_fd(), CODEX_Quorum::Message::length(), CODEX_ASN1::BigNumber::marshal(), CODEX_ASN1::Integer::marshal(), CODEX_Server::ServerState::privateKey(), CODEX_Server::QuorumBuilderExpectNonceEvent::read(), CODEX_Quorum::RemoteServer::sendTo(), CODEX_Quorum::RemoteServer::set_fd(), CODEX_Ciphers::RSAPrivateKey::sign(), CODEX_ASN1::BigNumber::unmarshal(), and CODEX_ASN1::ustring.

bool QuorumBuilderAct::handler QuorumBuilderEvent   event
 

Handle a QuorumBuilderEvent.

This event is just a trigger for the handler to try to make any outstanding connections to other servers in the quorum system.

Parameters:
event  The triggering event
Returns:
false, which will keep this event perpetually in the queue.

Definition at line 51 of file QuorumBuilderAct.cc.

References CODEX_Server::ServerState::haveQuorumServer(), CODEX_Server::ServerState::hostName(), CODEX_Server::ServerState::hostNum(), CODEX_Server::QuorumBuilderEvent::lastAttempt(), CODEX_Events::Activity::sendEvent(), CODEX_Server::ServerState::serverOutSocketBuilder(), CODEX_Server::ServerState::serverPort(), and CODEX_Server::QuorumBuilderEvent::setLastAttempt().

Referenced by CODEX_Server::QuorumBuilderExpectNonceEvent::handle(), and CODEX_Server::QuorumBuilderEvent::handle().


The documentation for this class was generated from the following files:
Generated on Wed Jun 2 16:33:20 2004 for COrnell Data EXchange (CODEX) by doxygen1.2.18