In file /home/eternity/Source/Acs/Majordomo/H/majordomo.h:

class Majordomo : public Runable, public AcsOffspring

Acs majordomo

Inheritance:

Majordomo < Runable < Debugable

Majordomo < AcsOffspring


Public Methods

Err Majordomo::CommandCertificatesReceived (MsgField *dataFld)
Processes CMD_CERTIFICATES_RECEIVED command
Err Majordomo::CommandControllACCount (MsgField *dataFld)
Serves TO_CHECK_AC_COUNT command
Err Majordomo::CommandDelFinderTbl (MsgField *dataFld)
Serves the TO_DEL_FINDER_TBL command
Err Majordomo::CommandTimeoutAllocation (MsgField *dataFld)
Serves TO_ALLOC Processes timeout command for allocation
Err Majordomo::DRCRFSGetFields (const MsgField *dataFld, GMessage **replyToAC, TID *replyToTID, Size *fileSize, RelTime **storageTime)
Parses GMessage comming with CE_REQ_FOR_STOR command
Err Majordomo::DRCReplyAllocation (const MsgField *dataFld)
Serves the CE_REPLY_ALLOCATION message
Err Majordomo::DRCReplyStorage (const MsgField *dataFld)
Serves the reply to CE_DATA_TO_STOR Looks into the message, whether the storage was successful and prints the result to the stdout
Err Majordomo::DRCRequestForFile (const MsgField *dataField, const ACID acid)
Serves CMD_REQ_FOR_FILE message
Err Majordomo::FillRequestForFile (GMessage *outMsg, MsgField * aFFID, GMessage *transportKey, Int depth, Int width)
Sets the outMsg as RequestForFile
Err Majordomo::FillRequestForHeaders (GMessage *outMsg, MsgField *aFAM, GMessage *transportKey, Int depth, Int width)
Sets the outMsg as RequestForHeaders
void Majordomo::FindFile (ArrayGMessage *certificates)
Tries to find file on Esos
void Majordomo::FindHeaders (ArrayGMessage *certificates)
Tries to find headers on Esos
GMessage* Majordomo::LoadPublicKey ()
Returns Client's pubKey
Majordomo::Majordomo (Acs * parent, LogFile * majordomoLogFile)
Acs Majordomo constructor
Majordomo::Majordomo (Client * parent, LogFile * logFile)
Constructor of Majordomo in Client
Majordomo::Majordomo (Eso * parent, LogFile * majordomoLogFile)
Eso Majordomo constructor

Public

methods
Majordomo (Acs * parent, LogFile * majordomoLogFile)
Constructor
virtual void* Run (void *)
This method runs in thread and processes all the requests

Inherited from Runable:

Public Methods

void Runable::MaskAllSignals()
Runable::Runable(LogFile * logFile)

Inherited from Debugable:

Public Methods

string* Debugable::CreateString(char *firstStr, int firstInt, int secondInt)
Debugable::Debugable(LogFile * debugLogFile)
int Debugable::SetDebugOptions(int newLogOptions)
void Debugable::SetLogFile(LogFile *aLogFile)
void Debugable::WriteString(LogLevel debugLevel, char * format, ...)
Debugable::~Debugable()

Public

attributes

int debugOptions
What messages should be logged
LogFile* logFile
Log file for debug messages

Inherited from AcsOffspring:

Public Methods

AcsOffspring::AcsOffspring(Acs * acs)

Documentation

Acs majordomo.. Processes various requests for certificates comming from network and takes apropriate action like sends back the requested certificates
methods

Majordomo(Acs * parent, LogFile * majordomoLogFile)
Constructor

virtual void* Run(void *)
This method runs in thread and processes all the requests

Err Majordomo::CommandCertificatesReceived(MsgField *dataFld)
Processes CMD_CERTIFICATES_RECEIVED command. Processes CMD_CERTIFICATES_RECEIVED command by putting received certificates to appropriate ACManager.
Returns:
error code
Parameters:
dataFld - data comming along with command
Author:
Marek
See Also:
InsertAC()

Err Majordomo::CommandControllACCount(MsgField *dataFld)
Serves TO_CHECK_AC_COUNT command. Processes timeout command for controlling count of ACs.
Returns:
error code
Parameters:
dataFld - data comming with timeout
Author:
Marek, Pavel
See Also:
ACManager, Scheduler, GenerateRequestForMissingACs(), CreateNextACTimeOutMsg()

Err Majordomo::CommandDelFinderTbl(MsgField *dataFld)
Serves the TO_DEL_FINDER_TBL command. Processes timeout command for deleting tables in Finder.
Returns:
error code
Parameters:
dataFld - data comming with timeout
Author:
Marek, Pavel
See Also:
Finder, Scheduler

Err Majordomo::CommandTimeoutAllocation(MsgField *dataFld)
Serves TO_ALLOC Processes timeout command for allocation. Deletes apropriate records in Allocator and Banker.
Returns:
error code
Parameters:
dataFld - data comming with timeout
Author:
Marek, Pavel
See Also:
Allocator, Banker,

Err Majordomo::DRCRFSGetFields(const MsgField *dataFld, GMessage **replyToAC, TID *replyToTID, Size *fileSize, RelTime **storageTime)
Parses GMessage comming with CE_REQ_FOR_STOR command. GMessage comming with command CE_REQ_FOR_STOR should have this structure:
Reply-To-ID: ID of a message assigned by sender (Client)
File-Size: Size of file Client whishes to store
Storage-Time: RelTime for which the file should be stored
Returns:
error code
Parameters:
dataFld - data comming with command
replyToAC - out parameter for Reply-To access certificate
replyToTID - out parameter for Reply-To message ID
fileSize - out parameter for size of file whished to stored
storageTime - out parameter for time for which the file should be stored
Author:
Pavel
See Also:
DRCRequestForStorage()

Err Majordomo::DRCReplyAllocation(const MsgField *dataFld)
Serves the CE_REPLY_ALLOCATION message. Looks into the messages, whether or not the allocation was succesful. If yes, adds the Eso certificate to yesCertificates ArrayGMessage.
Returns:
error code
Parameters:
dataFld - data from the incoming message
Author:
Pavel
See Also:
Banker

Err Majordomo::DRCReplyStorage(const MsgField *dataFld)
Serves the reply to CE_DATA_TO_STOR Looks into the message, whether the storage was successful and prints the result to the stdout.
Returns:
error code
Parameters:
dataFld - Data from the incoming message.
Author:
Pavel
See Also:
Banker

Err Majordomo::DRCRequestForFile(const MsgField *dataField, const ACID acid)
Serves CMD_REQ_FOR_FILE message.
processes the incoming request for file
- searches for file on this server
- if not found, continues the search 
in the search tree
- if found, sends the file back to the client
Returns:
error code
- KO in the case of bad structure of dataField
or if fatal error comes (ex. NULL ptr to Finder)
- OK otherwise     
(that means even in case of mistake in any step
of the algorithm [ex. cannot send the message
back to client] - these situations are only
written to the logFile)
Author:
Marek
See Also:
TCBWrapper, Finder, ACManager

Err Majordomo::FillRequestForFile(GMessage *outMsg, MsgField * aFFID, GMessage *transportKey, Int depth, Int width)
Sets the outMsg as RequestForFile. Fills all needed fields in a message that is sent as a reply to CMD_REQ_FOR_FILE command.
Returns:
error code
Parameters:
parametr -
Author:
Marek
See Also:
co_se_toho_tyka

Err Majordomo::FillRequestForHeaders(GMessage *outMsg, MsgField *aFAM, GMessage *transportKey, Int depth, Int width)
Sets the outMsg as RequestForHeaders . Fills all needed fields in a message that is sent as a reply to CMD_REQ_FOR_HEADERS command.
Returns:
error code
Parameters:
parametr -
Author:
Marek
See Also:
co_se_toho_tyka

void Majordomo::FindFile(ArrayGMessage *certificates)
Tries to find file on Esos. Creates request message, sends it to given number of Esos and waits for reply.
Returns:
void
Parameters:
certificates - Certificates of Esos to ask.
Author:
Marek
See Also:

void Majordomo::FindHeaders(ArrayGMessage *certificates)
Tries to find headers on Esos. Creates request message, sends it to given number of Esos and waits for reply.
Returns:
void
Parameters:
certificates - Certificates of Esos to ask.
Author:
Marek
See Also:

GMessage* Majordomo::LoadPublicKey()
Returns Client's pubKey. Loads Client's pubKey from file.
Returns:
client's pubKey
Author:
Marek
See Also:

Majordomo::Majordomo(Acs * parent, LogFile * majordomoLogFile)
Acs Majordomo constructor. Just initializes the parent classes as it has nothing else to do.
Parameters:
parent - Pointer to the parent Acs.
logFile - Log file where to write messages
Author:
Venca
See Also:
Acs

Majordomo::Majordomo(Client * parent, LogFile * logFile)
Constructor of Majordomo in Client. Initializes the specific attributes.
Parameters:
parent - Parent of the object.
logFile - LogFile to write to.
Author:
Pavel
See Also:
SixCertificates

Majordomo::Majordomo(Eso * parent, LogFile * majordomoLogFile)
Eso Majordomo constructor. Calls SixMajordomo constructor.
Parameters:
parent - Eso this Majordomo belongs to
majordomoLogFile - log file for debugging messages
Author:
Pavel
See Also:
Six, SixMajordomo


This class has no child classes.
Author:
Venca
See Also:
Acs

alphabetic index hierarchy of classes


generated by doc++