LocalRegistrationManager Class Reference

#include <LocalRegistrationManager.hpp>

Inheritance diagram for LocalRegistrationManager:
[legend]

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

RegistrationTablelocateTable (RegistrationType type)
 

Protected Attributes

bool locked
 
RegistrationTable functions
 
RegistrationTable exits
 
RegistrationTable commandHandlers
 
- Protected Attributes inherited from LocalAPISubsystem
LocalAPIManagerapiManager
 

Detailed Description

Definition at line 50 of file LocalRegistrationManager.hpp.

Constructor & Destructor Documentation

◆ LocalRegistrationManager()

LocalRegistrationManager::LocalRegistrationManager ( )

Definition at line 49 of file LocalRegistrationManager.cpp.

Member Function Documentation

◆ dropCallback()

RexxReturnCode LocalRegistrationManager::dropCallback ( RegistrationType  type,
const char *  name,
const char *  module 
)

Drop a registered callback.

Parameters
typeThe type of callback to process.
nameThe name of the callback.
moduleAn optional library qualifier
Returns
The operation return code.

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.

◆ locateTable()

RegistrationTable & LocalRegistrationManager::locateTable ( RegistrationType  type)
protected

Locate the target table for a registration based on the type.

Parameters
typeThe target registration type
Returns
A reference to the registration table.

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

◆ mapReturnResult()

RexxReturnCode LocalRegistrationManager::mapReturnResult ( ServiceMessage m)

Process an result returned from the server and map it into an API return code.

Parameters
mThe return message.
Returns
The mapped return code.

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

◆ processServiceException()

RexxReturnCode LocalRegistrationManager::processServiceException ( ServiceException e)
virtual

Convert an exception returned from the service into a return code.

Parameters
eThe service exception.
Returns
The mapped return code.

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

◆ queryCallback() [1/2]

RexxReturnCode LocalRegistrationManager::queryCallback ( RegistrationType  type,
const char *  name 
)

Perform an existance query for a callback

Parameters
typeThe type of callback to check.
nameThe callback name.
Returns
The query return code.

Definition at line 203 of file LocalRegistrationManager.cpp.

References locateTable(), mapReturnResult(), RegistrationTable::queryCallback(), REGISTER_QUERY, RegistrationManager, RXSUBCOM_OK, ClientMessage::send(), and type.

◆ queryCallback() [2/2]

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.

Parameters
typeThe registration type.
nameThe name of the callback,
moduleThe optional target library.
userDataThe pointer for the returned userdata.
Returns
The service return code.

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.

◆ registerCallback() [1/2]

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.

Parameters
typeThe type of callback being registered
nameThe name of the callback (unique within the type)
moduleThe name of the library containing the callback.
procThe name of the callback entry point within the library.
userDataPointer to userdata saved with the registered callback.
dropThe drop authority.
Returns
The return code for the registration.

Definition at line 66 of file LocalRegistrationManager.cpp.

References mapReturnResult(), REGISTER_LIBRARY, RegistrationManager, ClientMessage::send(), ServiceMessage::setMessageData(), and type.

◆ registerCallback() [2/2]

RexxReturnCode LocalRegistrationManager::registerCallback ( RegistrationType  type,
const char *  name,
REXXPFN  entryPoint,
const char *  userData 
)

Register an in-process callback handler.

Parameters
typeThe type of handler.
nameThe name of the handler.
entryPointThe callback entry point.
userDataThe optional userdata pointer.
Returns
The message return code.

Definition at line 90 of file LocalRegistrationManager.cpp.

References locateTable(), mapReturnResult(), REGISTER_ENTRYPOINT, RegistrationTable::registerCallback(), RegistrationManager, ServiceMessage::setMessageData(), and type.

◆ resolveCallback()

RexxReturnCode LocalRegistrationManager::resolveCallback ( RegistrationType  type,
const char *  name,
const char *  module,
REXXPFN entryPoint 
)

Resolve a registered callback entry point.

Parameters
typeThe registration type
nameThe name of the callback.
moduleAn optional library qualifier.
entryPointPointer 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.

Member Data Documentation

◆ commandHandlers

RegistrationTable LocalRegistrationManager::commandHandlers
protected

Definition at line 78 of file LocalRegistrationManager.hpp.

Referenced by locateTable().

◆ exits

RegistrationTable LocalRegistrationManager::exits
protected

Definition at line 77 of file LocalRegistrationManager.hpp.

Referenced by locateTable().

◆ functions

RegistrationTable LocalRegistrationManager::functions
protected

Definition at line 76 of file LocalRegistrationManager.hpp.

Referenced by locateTable().

◆ locked

bool LocalRegistrationManager::locked
protected

Definition at line 75 of file LocalRegistrationManager.hpp.

Referenced by locateTable().


The documentation for this class was generated from the following files: