rwsf::ConnectorImprwsf::BodyBase
ConnectorImp() doInit() doReinit() getHandlerChain() |
getLogger() getName() getPersistenceId() init() |
reinit() restoreRequests() restoreSpecificRequests() start() |
stop() |
#include rwsf/handlers/ConnectorImp.h
Class ConnectorImp defines an abstract interface for Agent connectors. This class serves as an abstract base class for implementing agent connectors, which create MessageInfo objects and pass them through a handler chain.
ConnectorImp();
Creates a new connector implementation.
void doInit(const rwsf::Config & config, const rwsf::AgentContext & agent);
Configures this connector implementation.
void doReinit(const rwsf::Config & config, const rwsf::AgentContext & agent);
Reconfigures this connector implementation.
rwsf::MessageInfoHandlerChain getHandlerChain() const;
Determines the handler chain for this connector. The handler chain is required and can only be set during initialization.
Return value
Handler chain for this connector.
rwsf::Logger getLogger();
Returns the logger for this connector
std::string getName() const;
Determines the name of this connector. The name of the connector is optional and can only be set during initialization.
Return value
Name of this connector, or empty string if none provided.
std::string getPersistenceId();
Gets the persistence id of this connector. This id can be used by a connector when persisting data to a persistence medium. The default implementation returns a string that is based on the connector name with all non-alphanumeric characters removed, making it suitable for use in a filename. Derived classes can override this function to provide an alternative implementation.
void restoreRequests(bool startup);
Called to restore persisted requests for this connector. Base class implementation does nothing.
void restoreSpecificRequests(const std::vector< std::string > & requestKeys);
Restores the persisted requests specified by the vector of persistence keys passed in. Base class implementation does nothing.
void start() = 0;
Starts this connector. This function must be implemented by derived classes. Also, the implementation should not block process execution, that is, it should return control immediately to the caller.
void stop() = 0;
Stops this connector. This function must be implemented by derived classes. The implementation can block process execution, if neccessary, until shutdown is completed.
void init(const rwsf::Config & config, const rwsf::AgentContext & agent) = 0;
Initializes this connector implementation. If this function is overridden in derived classes, the overriding function must call this function first before doing anything else.
void reinit(const rwsf::Config & config, const rwsf::AgentContext & agent) = 0;
Overridden to provide specific conenctor reconfiguration.
© 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.