In file /home/eternity/Source/Mix/Linker/H/linker.h:

class Linker : public Runable, public MixOffspring, public Shutdownable

Messages linker

Inheritance:

Linker < Runable < Debugable

Linker < MixOffspring

Linker < Shutdownable


Public Methods

Linker::Linker (Mix * parent, LogFile * linkerLogFile)
Mix linker constructor
void* Linker::Run (void *)
Mix linker Run() method
void Linker::Shutdown ()
Prepare for clean shutdown
GMessage* Linker::StoreChunk (GMessage * chunk)
Store chunk of message into internal structures

Public

methods

Protected

attributes

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()

Inherited from MixOffspring:

Public Methods

MixOffspring::MixOffspring(Mix * mix)

Inherited from Shutdownable:

Public Methods

Shutdownable::Shutdownable(Killer * killer)

Documentation

Messages linker. Collects chunks of messages (created by chopper) as they arrive, stores them until the message is complete and then joins the chunks so that it reconstruct the original message.
attributes

methods

Linker::Linker(Mix * parent, LogFile * linkerLogFile)
Mix linker constructor. Allocates a new object of type PartialMessages for storing chunks for different messages.
Parameters:
parent - Pointer to Mix object.
parent - linkerLogFile Log file.
Author:
Venca
See Also:
PartialMessage

void* Linker::Run(void *)
Mix linker Run() method. Processes all messages from the incoming queue and inserts them into its internal structures. Has to watch if a message is already completed and then it kinks all its chunks together and passes the final message further to Majordomo for processing.
Returns:
void pointer
Author:
Venca
See Also:
Chopper, Majordomo

void Linker::Shutdown()
Prepare for clean shutdown. This method should implement all the tasks necessary for preparation for a clean shutdown like saving inconsistent data to disk etc. Now it is empty as Linker is completely stateless as the loss of some partially received messages is not fatal. return void
Author:
Venca
See Also:
Shutdownable, Killer

GMessage* Linker::StoreChunk(GMessage * chunk)
Store chunk of message into internal structures. Actually performs the task of storing message into its internal structures, checking for Message ID conflicts and checking if the message is already complete. If that is true than a completely linked message is returned.
Returns:
Completely linked message if any else NULL.
Parameters:
chunk - Message from network that represents one chunk of original message and as such has to be linked with all the others to reconstruct it.
Author:
Venca
See Also:
Majordomo::Run(), Chopper, Chopper::CreateChunks()


This class has no child classes.
Author:
Venca
See Also:
ChunkData, PartialMessage, PartialMessages

alphabetic index hierarchy of classes


generated by doc++