IceManagerImpl.h
Go to the documentation of this file.
1#pragma once
2
3#include <mutex>
4#include <unordered_map>
5
6#include <Ice/Identity.h>
7
8#include "IceManager.h"
9
10namespace armarx
11{
12
14 {
15 using ObjectRegistry = std::unordered_map<std::string, ObjectEntryPtr>;
16 using ProxyMap = std::unordered_map<std::string, Ice::ObjectPrx>;
17
18 /**
19 * Application communicator
20 */
22
23 /**
24 * IceStorm Topic Manager proxy
25 */
27
28 /**
29 * TopicManager instantiation mutex
30 */
32
33 std::mutex proxyCacheMutex;
34
35
36 /**
37 * Ice grid admin instance used administrate component objects
38 * withing the IceGrid
39 */
41
42 /**
43 * IceGridAdmin instantiation mutex
44 */
46
47 /**
48 * Session name
49 */
50 std::string name;
51
52 /**
53 * Object registry which contains object dependecy and IceStorm
54 * topic information.
55 */
57
58 /**
59 * Mutex for adding, activating and removing objects
60 */
62
63 /**
64 * Retrieved and down casted checked proxies. If a requested proxy
65 * resides in this map, a unchecked cast solely is performed before
66 * returning the proxy.
67 */
69
70 /**
71 * Suffix for all topics. This is mainly used to direct all topics to another, unused topic
72 * for replaying purposes.
73 */
74 std::string topicSuffix;
75 /**
76 * Retrieved topics map
77 */
78 std::map<std::string, IceStorm::TopicPrx> topics;
79
80 /**
81 * Subscribed IceStorm topics
82 */
83 std::vector<std::pair<std::string, Ice::ObjectPrx>> subscriptions;
84
85 /**
86 * Mutex for delayed topic retrieval and subscription registration
87 */
89
90 /**
91 * Mutex for retrieving and subscribing topics
92 */
94
95 /**
96 * Mutex for retrieving and subscribing topics
97 */
99
100 /**
101 * Flag of forcing shutdown procedure.
102 */
104 };
105
106 struct IceManager::ObjectEntry : public IceUtil::Shared
107 {
109 name(std::string()),
110 proxy(nullptr),
111 adapter(nullptr),
112 updated(true),
114 active(false),
115 ownAdapter(true)
116 {
117 }
118
119 std::string name;
120 Ice::Identity id;
121 Ice::ObjectPrx proxy;
123 TopicList usedTopics;
124 TopicList offeredTopics;
125 DependencyList dependencies;
128 bool active;
130 };
131
132} // namespace armarx
::IceInternal::ProxyHandle<::IceProxy::IceStorm::TopicManager > TopicManagerPrx
Definition IceManager.h:69
::IceInternal::Handle<::Ice::Communicator > CommunicatorPtr
Definition IceManager.h:49
::IceInternal::Handle<::Ice::ObjectAdapter > ObjectAdapterPtr
Definition IceManager.h:52
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< IceGridAdmin > IceGridAdminPtr
Definition ArmarXFwd.h:48
std::mutex topicRegistrationMutex
Mutex for delayed topic retrieval and subscription registration.
std::map< std::string, IceStorm::TopicPrx > topics
Retrieved topics map.
Ice::CommunicatorPtr communicator
Application communicator.
IceStorm::TopicManagerPrx topicManagerProxy
IceStorm Topic Manager proxy.
std::mutex objectRegistryMutex
Mutex for adding, activating and removing objects.
std::mutex topicManagerMutex
TopicManager instantiation mutex.
std::mutex topicRetrievalMutex
Mutex for retrieving and subscribing topics.
ObjectRegistry objectRegistry
Object registry which contains object dependecy and IceStorm topic information.
std::mutex topicSubscriptionMutex
Mutex for retrieving and subscribing topics.
std::unordered_map< std::string, ObjectEntryPtr > ObjectRegistry
bool forceShutdown
Flag of forcing shutdown procedure.
IceGridAdminPtr iceGridAdmin
Ice grid admin instance used administrate component objects withing the IceGrid.
ProxyMap checkedProxies
Retrieved and down casted checked proxies.
std::mutex iceGridAdminMutex
IceGridAdmin instantiation mutex.
std::string name
Session name.
std::string topicSuffix
Suffix for all topics.
std::unordered_map< std::string, Ice::ObjectPrx > ProxyMap
std::vector< std::pair< std::string, Ice::ObjectPrx > > subscriptions
Subscribed IceStorm topics.
Ice::ObjectAdapterPtr adapter