rwsf::AgentContextrwsf::MessageInfo
#include rwsf/handlers/AgentContext.h
Class AgentContext is a generic container for holding types that are shared across a particular agent instance.
AgentContext();
Default constructor.
AgentContext(const AgentContext & context);
Copy constructor.
AgentContext(rwsf::AgentContextImp * context);
Body constructor.
rwsf::AgentContext::AgentState strToAgentState(const std::string & type);
Helper function to convert a string to an AgentState.
bool arePerformanceTestSplitsEnabled() const;
Returns true if performance-testing SLI split events should be enabled
std::string getAgentId();
Gets the id of the agent.
rwsf::AgentContext::AgentState getAgentState() const;
Gets the Agent State. Default is AgentStateNormal
std::string getConfigurationFile() const;
Returns the configuration file used to start the agent. This same config file will be used on any reconfiguration requests as well.
rwsf::ConfigurationManager * getConfigurationManager() const;
Gets the ConfigurationManager pointer for this AgentContext.
rwsf::Connector getConnector(const std::string & name) const;
Retrieves the connector associated with the specified name. If one does not exist, an invalid handle is returned.
rwsf::Enumeration< rwsf::Connector > getConnectors() const;
Returns an enumeration of all of the connectors registered in the agent.
rwsf::MessageInfoHandlerChain getHandlerChain(const std::string & name) const;
Retrieves the handler chain associated with the specified name. If one does not exist, an empty chain is returned.
bool getInitialConfigurationComplete() const;
Returns true if the initial confiuration has completed
rwsf::Logger getLogger() const;
Gets the current default logger for this AgentContext.
rwsf::PersistenceResourceManager * getPersistenceResourceManager();
Gets the persistence resource manager for this AgentContext.
rwsf::PersistentRequestStore * getPersistentRequestStore();
Gets the persistence request store for this AgentContext.
rwsf::SLILogger getSLILogger() const;
Gets the SLI logger handle.
rwsf::TypeManager * getTypeManager() const;
Gets the TypeManager pointer for this AgentContext.
void init(const rwsf::Config & config);
Initialize the agent context with any special properties
bool isPerformanceTestEnabled() const;
Returns true if performance-testing SLI events should be enabled
void setAgentId(const std::string & id);
Sets the id of the agent.
void setAgentState(const rwsf::AgentContext::AgentState & agentState);
Sets the Agent State.
void setConfigurationFile(const std::string & file);
Sets the configuration file used to start the agent. This same config file will be used on any reconfiguration requests as well.
void setConfigurationManager(rwsf::ConfigurationManager * manager);
Sets the ConfigurationManager to use in this AgentContext.
void setConnector(const std::string & name, const rwsf::Connector & connector);
Sets the connector for the specified name.
void setDefaultSLIEvent(const std::string & type, bool enabled);
Turns on or off certain default agent SLI events
void setHandlerChain(const std::string & name, const rwsf::MessageInfoHandlerChain & chain);
Sets the handler chain for the specified name.
void setInitialConfigurationComplete(bool complete);
Sets whether or not the initial configuration has completed
void setLogger(const rwsf::Logger & logger);
Sets the default logger for this AgentContext.
void setSLILogger(const rwsf::SLILogger & sli);
Sets the SLI Logger to the given SLILogger object.
void setStartingAgentState(const rwsf::AgentContext::AgentState & agentState);
Sets the stareting Agent State. The state will not be set until the initialization of the context is complete.
void setTypeManager(rwsf::TypeManager * manager);
Sets the TypeManager to use in this AgentContext.
rwsf::AgentContextImp & body() const;
Reimplements method in rwsf::MessageInfo
Base class documentation:
Returns the implementation for this MessageInfo object.
Return value
A const reference to the implementation object.
AgentContext & operator=(const AgentContext & context);
Assignment operator.
© 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.