#include <LocalRegistrationManager.hpp>
Public Member Functions | |
LocalRegistrationManager () | |
RexxReturnCode | registerCallback (RegistrationType type, const char *name, const char *module, const char *proc, const char *userData, bool drop) |
RexxReturnCode | registerCallback (RegistrationType type, const char *name, REXXPFN entryPoint, const char *userData) |
RexxReturnCode | dropCallback (RegistrationType type, const char *name, const char *module) |
RexxReturnCode | queryCallback (RegistrationType type, const char *name) |
RexxReturnCode | queryCallback (RegistrationType type, const char *name, const char *module, char *userData) |
RexxReturnCode | resolveCallback (RegistrationType type, const char *name, const char *module, REXXPFN &entryPoint) |
RexxReturnCode | mapReturnResult (ServiceMessage &m) |
virtual RexxReturnCode | processServiceException (ServiceException *e) |
Public Member Functions inherited from LocalAPISubsystem | |
virtual | ~LocalAPISubsystem () |
virtual void | initializeLocal (LocalAPIManager *a) |
virtual void | terminateProcess () |
Protected Member Functions | |
RegistrationTable & | locateTable (RegistrationType type) |
Protected Attributes | |
bool | locked |
RegistrationTable | functions |
RegistrationTable | exits |
RegistrationTable | commandHandlers |
Protected Attributes inherited from LocalAPISubsystem | |
LocalAPIManager * | apiManager |
Definition at line 50 of file LocalRegistrationManager.hpp.
LocalRegistrationManager::LocalRegistrationManager | ( | ) |
Definition at line 49 of file LocalRegistrationManager.cpp.
RexxReturnCode LocalRegistrationManager::dropCallback | ( | RegistrationType | type, |
const char * | name, | ||
const char * | module | ||
) |
Drop a registered callback.
type | The type of callback to process. |
name | The name of the callback. |
module | An optional library qualifier |
Definition at line 157 of file LocalRegistrationManager.cpp.
References RegistrationTable::dropCallback(), locateTable(), mapReturnResult(), REGISTER_DROP, REGISTER_DROP_LIBRARY, RegistrationManager, RXSUBCOM_OK, ClientMessage::send(), ServiceMessage::setMessageData(), and type.
|
protected |
Locate the target table for a registration based on the type.
type | The target registration type |
Definition at line 115 of file LocalRegistrationManager.cpp.
References commandHandlers, exits, FunctionAPI, functions, SysLibrary::load(), locked, SubcomAPI, and type.
Referenced by dropCallback(), queryCallback(), registerCallback(), and resolveCallback().
RexxReturnCode LocalRegistrationManager::mapReturnResult | ( | ServiceMessage & | m | ) |
Process an result returned from the server and map it into an API return code.
m | The return message. |
Definition at line 379 of file LocalRegistrationManager.cpp.
References CALLBACK_NOT_FOUND, DROP_NOT_AUTHORIZED, ServiceMessage::result, RXSUBCOM_NOCANDROP, RXSUBCOM_NOTREG, and RXSUBCOM_OK.
Referenced by dropCallback(), queryCallback(), registerCallback(), and resolveCallback().
|
virtual |
Convert an exception returned from the service into a return code.
e | The service exception. |
Reimplemented from LocalAPISubsystem.
Definition at line 355 of file LocalRegistrationManager.cpp.
References CALLBACK_NOT_FOUND, DROP_NOT_AUTHORIZED, ServiceException::getErrorCode(), RXAPI_MEMFAIL, RXSUBCOM_NOCANDROP, and RXSUBCOM_NOTREG.
Referenced by LocalAPIManager::processServiceException().
RexxReturnCode LocalRegistrationManager::queryCallback | ( | RegistrationType | type, |
const char * | name | ||
) |
Perform an existance query for a callback
type | The type of callback to check. |
name | The callback name. |
Definition at line 203 of file LocalRegistrationManager.cpp.
References locateTable(), mapReturnResult(), RegistrationTable::queryCallback(), REGISTER_QUERY, RegistrationManager, RXSUBCOM_OK, ClientMessage::send(), and type.
RexxReturnCode LocalRegistrationManager::queryCallback | ( | RegistrationType | type, |
const char * | name, | ||
const char * | module, | ||
char * | userData | ||
) |
Perform a callback query, retrieving the userdata provided when the callback was registered.
type | The registration type. |
name | The name of the callback, |
module | The optional target library. |
userData | The pointer for the returned userdata. |
Definition at line 237 of file LocalRegistrationManager.cpp.
References CALLBACK_EXISTS, ServiceMessage::getMessageData(), locateTable(), mapReturnResult(), RegistrationTable::queryCallback(), REGISTER_QUERY, REGISTER_QUERY_LIBRARY, RegistrationManager, ServiceMessage::result, ServiceRegistrationData::retrieveUserData(), ClientMessage::send(), ServiceMessage::setMessageData(), and type.
RexxReturnCode LocalRegistrationManager::registerCallback | ( | RegistrationType | type, |
const char * | name, | ||
const char * | module, | ||
const char * | proc, | ||
const char * | userData, | ||
bool | drop | ||
) |
Register a DLL-based callback type.
type | The type of callback being registered |
name | The name of the callback (unique within the type) |
module | The name of the library containing the callback. |
proc | The name of the callback entry point within the library. |
userData | Pointer to userdata saved with the registered callback. |
drop | The drop authority. |
Definition at line 66 of file LocalRegistrationManager.cpp.
References mapReturnResult(), REGISTER_LIBRARY, RegistrationManager, ClientMessage::send(), ServiceMessage::setMessageData(), and type.
RexxReturnCode LocalRegistrationManager::registerCallback | ( | RegistrationType | type, |
const char * | name, | ||
REXXPFN | entryPoint, | ||
const char * | userData | ||
) |
Register an in-process callback handler.
type | The type of handler. |
name | The name of the handler. |
entryPoint | The callback entry point. |
userData | The optional userdata pointer. |
Definition at line 90 of file LocalRegistrationManager.cpp.
References locateTable(), mapReturnResult(), REGISTER_ENTRYPOINT, RegistrationTable::registerCallback(), RegistrationManager, ServiceMessage::setMessageData(), and type.
RexxReturnCode LocalRegistrationManager::resolveCallback | ( | RegistrationType | type, |
const char * | name, | ||
const char * | module, | ||
REXXPFN & | entryPoint | ||
) |
Resolve a registered callback entry point.
type | The registration type |
name | The name of the callback. |
module | An optional library qualifier. |
entryPoint | Pointer for returning the entry point address. |
Definition at line 294 of file LocalRegistrationManager.cpp.
References CALLBACK_EXISTS, ServiceRegistrationData::entryPoint, ServiceMessage::getMessageData(), SysLibrary::getProcedure(), SysLibrary::load(), locateTable(), mapReturnResult(), ServiceRegistrationData::moduleName, ServiceRegistrationData::procedureName, RegistrationTable::queryCallback(), REGISTER_LOAD_LIBRARY, RegistrationManager, ServiceMessage::result, RXSUBCOM_NOTREG, ClientMessage::send(), Utilities::strupper(), and type.
|
protected |
Definition at line 78 of file LocalRegistrationManager.hpp.
Referenced by locateTable().
|
protected |
Definition at line 77 of file LocalRegistrationManager.hpp.
Referenced by locateTable().
|
protected |
Definition at line 76 of file LocalRegistrationManager.hpp.
Referenced by locateTable().
|
protected |
Definition at line 75 of file LocalRegistrationManager.hpp.
Referenced by locateTable().