#include <RegistrationTable.hpp>
Public Member Functions | |
RegistrationTable () | |
void | registerLibraryCallback (ServiceMessage &message) |
void | registerCallback (ServiceMessage &message) |
void | queryCallback (ServiceMessage &message) |
void | queryLibraryCallback (ServiceMessage &message) |
void | dropCallback (ServiceMessage &message) |
void | dropLibraryCallback (ServiceMessage &message) |
void | updateCallback (ServiceMessage &message) |
RegistrationData * | locate (RegistrationData *anchor, const char *name) |
RegistrationData * | locate (const char *name, const char *module) |
RegistrationData * | locate (const char *name) |
RegistrationData * | locate (const char *name, SessionID session) |
void | remove (RegistrationData **anchor, RegistrationData *block) |
void | reorderBlocks (RegistrationData *&anchor, RegistrationData *current, RegistrationData *previous) |
void | freeProcessEntries (SessionID session) |
bool | hasEntries () |
bool | isEmpty () |
Protected Attributes | |
RegistrationData * | firstEntryPoint |
RegistrationData * | firstLibrary |
Definition at line 98 of file RegistrationTable.hpp.
|
inline |
Definition at line 101 of file RegistrationTable.hpp.
References firstEntryPoint, and firstLibrary.
void RegistrationTable::dropCallback | ( | ServiceMessage & | message | ) |
Definition at line 415 of file RegistrationTable.cpp.
References CALLBACK_DROPPED, CALLBACK_NOT_FOUND, DROP_NOT_AUTHORIZED, RegistrationData::dropAuthority, firstEntryPoint, firstLibrary, ServiceMessage::freeMessageData(), RegistrationData::hasReferences(), locate(), ServiceMessage::nameArg, RegistrationData::owner, OWNER_ONLY, remove(), RegistrationData::removeSessionReference(), ServiceMessage::session, and ServiceMessage::setResult().
Referenced by ServerRegistrationManager::dispatch(), and LocalRegistrationManager::dropCallback().
void RegistrationTable::dropLibraryCallback | ( | ServiceMessage & | message | ) |
Definition at line 468 of file RegistrationTable.cpp.
References CALLBACK_DROPPED, CALLBACK_NOT_FOUND, DROP_NOT_AUTHORIZED, RegistrationData::dropAuthority, firstEntryPoint, firstLibrary, ServiceMessage::freeMessageData(), ServiceMessage::getMessageData(), RegistrationData::hasReferences(), RegistrationData::isEntryPoint(), locate(), ServiceRegistrationData::moduleName, ServiceMessage::nameArg, RegistrationData::owner, OWNER_ONLY, queryCallback(), remove(), RegistrationData::removeSessionReference(), ServiceMessage::session, and ServiceMessage::setResult().
Referenced by ServerRegistrationManager::dispatch().
void RegistrationTable::freeProcessEntries | ( | SessionID | session | ) |
It will remove all the registration entries for a specific process
session | The session identifier. |
Definition at line 693 of file RegistrationTable.cpp.
References firstEntryPoint, RegistrationData::next, and RegistrationData::owner.
Referenced by ServerRegistrationManager::freeProcessRegistrations().
|
inline |
Definition at line 121 of file RegistrationTable.hpp.
References firstEntryPoint, and firstLibrary.
Referenced by isEmpty().
|
inline |
Definition at line 125 of file RegistrationTable.hpp.
References hasEntries().
Referenced by ServerRegistrationManager::isStoppable().
RegistrationData * RegistrationTable::locate | ( | const char * | name | ) |
search for a library-type registration
name | The target name. |
Definition at line 626 of file RegistrationTable.cpp.
References firstEntryPoint, firstLibrary, and locate().
RegistrationData * RegistrationTable::locate | ( | const char * | name, |
const char * | module | ||
) |
search for a library-type registration, qualified by name and library.
name | The callback name. |
module | The target module. |
Definition at line 598 of file RegistrationTable.cpp.
References firstLibrary, RegistrationData::matches(), RegistrationData::next, and reorderBlocks().
RegistrationData * RegistrationTable::locate | ( | const char * | name, |
SessionID | session | ||
) |
search for a local type registration
name | The target registration name. |
session | The session identifier. |
Definition at line 645 of file RegistrationTable.cpp.
References firstEntryPoint, RegistrationData::matches(), RegistrationData::next, and reorderBlocks().
RegistrationData * RegistrationTable::locate | ( | RegistrationData * | anchor, |
const char * | name | ||
) |
search for a name-only registration
anchor | The chain anchor. |
name | The target callback name. |
Definition at line 536 of file RegistrationTable.cpp.
References RegistrationData::matches(), and RegistrationData::next.
Referenced by dropCallback(), dropLibraryCallback(), locate(), queryCallback(), queryLibraryCallback(), registerCallback(), registerLibraryCallback(), and updateCallback().
void RegistrationTable::queryCallback | ( | ServiceMessage & | message | ) |
Definition at line 314 of file RegistrationTable.cpp.
References ServiceMessage::allocateMessageData(), CALLBACK_EXISTS, CALLBACK_NOT_FOUND, firstLibrary, RegistrationData::getRegistrationData(), locate(), ServiceMessage::nameArg, RegistrationData::owner, ServiceMessage::session, and ServiceMessage::setResult().
Referenced by ServerRegistrationManager::dispatch(), dropLibraryCallback(), LocalRegistrationManager::queryCallback(), queryLibraryCallback(), and LocalRegistrationManager::resolveCallback().
void RegistrationTable::queryLibraryCallback | ( | ServiceMessage & | message | ) |
Definition at line 346 of file RegistrationTable.cpp.
References CALLBACK_EXISTS, CALLBACK_NOT_FOUND, ServiceMessage::freeMessageData(), ServiceMessage::getMessageData(), RegistrationData::getRegistrationData(), locate(), ServiceRegistrationData::moduleName, ServiceMessage::nameArg, queryCallback(), and ServiceMessage::setResult().
Referenced by ServerRegistrationManager::dispatch().
void RegistrationTable::registerCallback | ( | ServiceMessage & | message | ) |
Definition at line 273 of file RegistrationTable.cpp.
References DUPLICATE_REGISTRATION, firstEntryPoint, firstLibrary, ServiceMessage::freeMessageData(), ServiceMessage::getMessageData(), locate(), ServiceMessage::nameArg, RegistrationData::next, REGISTRATION_COMPLETED, ServiceMessage::session, and ServiceMessage::setResult().
Referenced by ServerRegistrationManager::dispatch(), and LocalRegistrationManager::registerCallback().
void RegistrationTable::registerLibraryCallback | ( | ServiceMessage & | message | ) |
Definition at line 229 of file RegistrationTable.cpp.
References RegistrationData::addSessionReference(), DUPLICATE_REGISTRATION, firstLibrary, ServiceMessage::freeMessageData(), ServiceMessage::getMessageData(), locate(), ServiceRegistrationData::moduleName, ServiceMessage::nameArg, RegistrationData::next, REGISTRATION_COMPLETED, ServiceMessage::session, and ServiceMessage::setResult().
Referenced by ServerRegistrationManager::dispatch().
void RegistrationTable::remove | ( | RegistrationData ** | anchor, |
RegistrationData * | block | ||
) |
search for a name-only registration and remove it from the chain.
anchor | The chain anchor position. |
block | The block to locate. |
Definition at line 561 of file RegistrationTable.cpp.
References RegistrationData::next.
Referenced by dropCallback(), and dropLibraryCallback().
void RegistrationTable::reorderBlocks | ( | RegistrationData *& | anchor, |
RegistrationData * | current, | ||
RegistrationData * | previous | ||
) |
Reorder the registration blocks so that we put the most recently referenced registrations at the front of the queue.
anchor | The chain anchor. |
current | The block we're reordering. |
previous | The previous block in the chain (can be NULL if this item is already at the head of the chain). |
Definition at line 676 of file RegistrationTable.cpp.
References RegistrationData::next.
Referenced by locate().
void RegistrationTable::updateCallback | ( | ServiceMessage & | message | ) |
Definition at line 385 of file RegistrationTable.cpp.
References CALLBACK_EXISTS, CALLBACK_NOT_FOUND, RegistrationData::entryPoint, ServiceRegistrationData::entryPoint, ServiceMessage::freeMessageData(), ServiceMessage::getMessageData(), locate(), ServiceRegistrationData::moduleName, ServiceMessage::nameArg, and ServiceMessage::setResult().
Referenced by ServerRegistrationManager::dispatch().
|
protected |
Definition at line 131 of file RegistrationTable.hpp.
Referenced by dropCallback(), dropLibraryCallback(), freeProcessEntries(), hasEntries(), locate(), registerCallback(), and RegistrationTable().
|
protected |
Definition at line 132 of file RegistrationTable.hpp.
Referenced by dropCallback(), dropLibraryCallback(), hasEntries(), locate(), queryCallback(), registerCallback(), registerLibraryCallback(), and RegistrationTable().