rwsf::MessageInfoHandlerImprwsf::BodyBase
#include rwsf/handlers/MessageInfoHandlerImp.h
Class MessageInfoHandlerImp serves as an abstract base class for implementing MessageInfo handlers.
MessageInfoHandlerImp();
Default constructor.
std::string getName() const;
Returns the name of the handler, if one was provided. The name can be set only on initialization.
int getType() const;
Returns the type (in, out, fault) of this handler if one was provided; 0 otherwise. The type can only be set on initialization.
void init(const rwsf::Config & config, const rwsf::AgentContext & manager) = 0;
Initializes the handler with the specified configuration options. When implementing this method in derived classes, ensure that the base class init() method is also invoked.
Also sets the central manager so all handlers have access to all the globals (type manager, naming contexts, etc).
bool invoke(rwsf::MessageInfo & message) = 0;
Invokes this handler on the specified message. Returns true if the handler is successful; otherwise, false.
bool isHandlerInitialized() const;
Returns true if the base class init() method was called; otherwise, false. It's important that the subclass calls the superclass's init() method, so this function allows you to check that the init() method was indeed called.
© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.