|
|
The IceManager class provides simplified access to commonly used Ice features. More...
#include <ArmarXCore/core/IceManager.h>
Inheritance diagram for IceManager:Classes | |
| struct | Impl |
| struct | ObjectEntry |
Public Member Functions | |
| void | destroy () |
| Destroys the communicator. | |
| const Ice::CommunicatorPtr & | getCommunicator () |
| Short helper method to return the Ice Communicator. | |
| IceGrid::RegistryPrx | getIceGridRegistry () |
| Provides access to the IceGrid Registry. | |
| const armarx::IceGridAdminPtr & | getIceGridSession () |
| Provides access to the IceGrid AdminSession via IceGridAdmin. | |
| template<class ProxyType> | |
| ProxyType | getProxy (const std::string &name, const std::string &endpoints=std::string()) |
| Retrieves a proxy object. | |
| template<class TopicProxy> | |
| TopicProxy | getTopic (const std::string &topicName, bool useUDP=false) |
| Gets an Ice Storm topic for publishing messages. | |
| IceStorm::TopicManagerPrx | getTopicManager () |
| Provides access to the Ice Storm Topic Manager. | |
| std::string | getTopicSuffix () const |
| Get the suffix that is appended to all topics. | |
| IceManager (const Ice::CommunicatorPtr &communicator, std::string name="", const std::string topicSuffix="") | |
| Set up an instance of this class with a preexisting communicator. | |
| bool | isObjectReachable (std::string objectName) |
| creates a proxy to the object specified with parameter objectName and tries to ping it. | |
| template<typename ProxyType> | |
| bool | isObjectReachable (std::string objectName) |
| creates a proxy to the object specified with parameter objectName and tries to ping it. | |
| bool | isShutdown () |
| Determines whether the communicator is shutdown. | |
| void | registerAndSubscribeTopic (Ice::ObjectPtr subscriber, const std::string &topicName, bool orderedPublishing=false) |
| void | registerDelayedTopicRetrieval (const std::string ®istrantName, const std::string &topicName) |
| Registers a delayed topic retrieval. | |
| void | registerDelayedTopicSubscription (const std::string ®istrantName, const std::string &topicName) |
| Registers a delayed topic subscription. | |
| ObjectHandles | registerObject (const Ice::ObjectPtr &object, const std::string &objectName, const Ice::ObjectAdapterPtr &adapterToAddTo=nullptr) |
| Register an object with Ice for being accessed through IceGrid. | |
| void | registerObjectDependency (const std::string ®istrantName, const std::string &dependencyObjectName) |
| Registers a specified object that is required before activating the endpoints. | |
| void | removeObject (const std::string &objectName) |
| Removes an object from the IceGrid. | |
| bool | removeProxyFromCache (const Ice::ObjectPrx &proxy) |
| This functions removes the given proxy from the proxy cache. | |
| template<class ProxyType> | |
| bool | removeProxyFromCache (const std::string &name, const std::string &endpoints=std::string()) |
| This functions removes the given proxy from the proxy cache. | |
| bool | removeProxyFromCache (const std::string &name, const std::string &typeName, const std::string &endpoints=std::string()) |
| void | setName (std::string name) |
| Sets the session name. | |
| void | shutdown () |
| Removes all component objects and topics and shuts down the communicator. | |
| void | subscribeTopic (Ice::ObjectPrx subscriber, const std::string &topicName, bool orderedPublishing=false) |
| Subscribe an object to a particular Ice Storm topic. | |
| void | throwUserException (std::string const &message) |
| void | unsubscribeTopic (Ice::ObjectPrx subscriberProxy, const std::string &topicName) |
| Unsubscribe a given subscriber from a given topic. | |
| void | waitForShutdown () |
| Waits until all invoked operation has been processed. | |
| ~IceManager () override | |
Public Member Functions inherited from Logging | |
| SpamFilterDataPtr | deactivateSpam (float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const |
| disables the logging for the current line for the given amount of seconds. | |
| MessageTypeT | getEffectiveLoggingLevel () const |
| Logging () | |
| void | setLocalMinimumLoggingLevel (MessageTypeT level) |
| With setLocalMinimumLoggingLevel the minimum verbosity-level of log-messages can be set. | |
| void | setTag (const LogTag &tag) |
| void | setTag (const std::string &tagName) |
| virtual | ~Logging () |
Static Public Member Functions | |
| static IceStorm::TopicManagerPrx | GetTopicManager (Ice::CommunicatorPtr communicator) |
Friends | |
| class | Component |
Additional Inherited Members | |
Protected Member Functions inherited from Logging | |
| bool | checkLogLevel (MessageTypeT level) const |
| const LogSenderPtr & | getLogSender () const |
| Retrieve log sender. | |
| LogSenderPtr | loghelper (const char *file, int line, const char *function) const |
Protected Attributes inherited from Logging | |
| MessageTypeT | minimumLoggingLevel |
| SpamFilterDataPtr | spamFilter |
| LogTag | tag |
The IceManager class provides simplified access to commonly used Ice features.
| IceManager | ( | const Ice::CommunicatorPtr & | communicator, |
| std::string | name = "", | ||
| const std::string | topicSuffix = "" ) |
Set up an instance of this class with a preexisting communicator.
This is useful for creating an instance from within an Ice::Application. If you do not have a communicator yet you can use one of the static factory methods instead.
| communicator | An Ice communicator |
| name | A unique name, e.g. the base component's name. This name is used to create IceGridObservers, which must have a unique name. |
| topicSuffix | Suffix appended to all topic names. |
|
override |
| void destroy | ( | ) |
Destroys the communicator.
| const Ice::CommunicatorPtr & getCommunicator | ( | ) |
Short helper method to return the Ice Communicator.
Uses static communicator() method
| IceGrid::RegistryPrx getIceGridRegistry | ( | ) |
| const IceGridAdminPtr & getIceGridSession | ( | ) |
|
inline |
Retrieves a proxy object.
| name | Proxy name, e.g. Log |
| endpoints | The endpoints, e.g. tcp ‑p 10002 |
|
inline |
Gets an Ice Storm topic for publishing messages.
| topicName | The name of the topic to publish on. |
|
static |
| IceStorm::TopicManagerPrx getTopicManager | ( | ) |
| std::string getTopicSuffix | ( | ) | const |
Get the suffix that is appended to all topics.
| bool isObjectReachable | ( | std::string | objectName | ) |
creates a proxy to the object specified with parameter objectName and tries to ping it.
| objectName | Name of the object that should be checked |
| bool isObjectReachable | ( | std::string | objectName | ) |
creates a proxy to the object specified with parameter objectName and tries to ping it.
| objectName | Name of the object that should be checked |
| bool isShutdown | ( | ) |
Determines whether the communicator is shutdown.
| void registerAndSubscribeTopic | ( | Ice::ObjectPtr | subscriber, |
| const std::string & | topicName, | ||
| bool | orderedPublishing = false ) |
| void registerDelayedTopicRetrieval | ( | const std::string & | registrantName, |
| const std::string & | topicName ) |
Registers a delayed topic retrieval.
| registrantName | Registrant object name |
| topicName | The topic name |
| void registerDelayedTopicSubscription | ( | const std::string & | registrantName, |
| const std::string & | topicName ) |
Registers a delayed topic subscription.
| registrantName | Registrant object name |
| topicName | The topic name that should be subscribed later on |
| ObjectHandles registerObject | ( | const Ice::ObjectPtr & | object, |
| const std::string & | objectName, | ||
| const Ice::ObjectAdapterPtr & | adapterToAddTo = nullptr ) |
| void registerObjectDependency | ( | const std::string & | registrantName, |
| const std::string & | dependencyObjectName ) |
Registers a specified object that is required before activating the endpoints.
| registrantName | Object that has a dependency |
| dependecyObjectName | Dependecy object name |
| ObjectAlreadyActiveException |
| void removeObject | ( | const std::string & | objectName | ) |
Removes an object from the IceGrid.
| objectName | The name of the object that should be removed |
| bool removeProxyFromCache | ( | const Ice::ObjectPrx & | proxy | ) |
This functions removes the given proxy from the proxy cache.
This is useful if the cached proxy became invalid.
| name | Proxy name, e.g. Log |
| endpoints | The endpoints, e.g. tcp ‑p 10002 |
|
inline |
This functions removes the given proxy from the proxy cache.
This is useful if the cached proxy became invalid.
| name | Proxy name, e.g. Log |
| endpoints | The endpoints, e.g. tcp ‑p 10002 |
| bool removeProxyFromCache | ( | const std::string & | name, |
| const std::string & | typeName, | ||
| const std::string & | endpoints = std::string() ) |
| void setName | ( | std::string | name | ) |
Sets the session name.
| void shutdown | ( | ) |
Removes all component objects and topics and shuts down the communicator.
| void subscribeTopic | ( | Ice::ObjectPrx | subscriber, |
| const std::string & | topicName, | ||
| bool | orderedPublishing = false ) |
Subscribe an object to a particular Ice Storm topic.
If the object is already subscribed to the topic, it will be unsubscribed before. This is necessary to circumvent the usage from outdated subscriptions due to unproper exits.
| subcriber | A proxy of the object to be subscribed, implementing the interface for listening on this topic |
| topicName | The topic's name |
| orderedPublishing | If true, the order of topic calls is ensured. This might decrease performance. |
| void throwUserException | ( | std::string const & | message | ) |
| void unsubscribeTopic | ( | Ice::ObjectPrx | subscriberProxy, |
| const std::string & | topicName ) |
Unsubscribe a given subscriber from a given topic.
| subscriberProxy | of the subscriber |
| topicName | The name of the subscribed topic. |
| void waitForShutdown | ( | ) |
Waits until all invoked operation has been processed.
|
friend |