33#include <unordered_map>
36#include <Ice/BuiltinSequences.h>
37#include <Ice/Config.h>
38#include <Ice/Current.h>
39#include <Ice/Handle.h>
40#include <Ice/Identity.h>
41#include <Ice/ObjectF.h>
42#include <Ice/PropertiesF.h>
43#include <Ice/ProxyF.h>
49#include "ArmarXCore/interface/core/util/distributed/RemoteHandle/ClientSideRemoteHandleControlBlock.h"
53#include <ArmarXCore/interface/core/RemoteObjectNode.h>
78 "CoreCount", 0,
"The used count of cores (<=0 => autodetect)");
89 virtual public RemoteObjectNodeInterface,
116 return "RemoteObjectNode";
150 const std::string& registrationName,
151 const ComponentParameter& params,
152 const Ice::Current& = Ice::emptyCurrent)
override;
153 ClientSideRemoteHandleControlBlockBasePtr
155 const std::string& registrationName,
156 const ComponentParameter& params,
157 const Ice::Current& = Ice::emptyCurrent)
override;
161 const Ice::ObjectPtr& registree,
162 const Ice::Current& = Ice::emptyCurrent)
override;
163 ClientSideRemoteHandleControlBlockBasePtr
165 const Ice::ObjectPtr& registree,
166 const Ice::Current& = Ice::emptyCurrent)
override;
169 const Ice::ObjectPtr& registree,
170 const Ice::Current& = Ice::emptyCurrent)
override;
171 ClientSideRemoteHandleControlBlockBasePtr
173 const Ice::ObjectPtr& registree,
174 const Ice::Current& = Ice::emptyCurrent)
override;
205 std::string registrationName);
207 const std::string& registrationName,
208 const ComponentParameter& params);
219 ClientSideRemoteHandleControlBlockBasePtr
221 ClientSideRemoteHandleControlBlockBasePtr
Default component property definition container.
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Baseclass for all ArmarX ManagedIceObjects requiring properties.
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Property< PropertyType > getProperty(const std::string &name)
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
Properties for a RemoteObjectNodeComponent.
RemoteObjectNodePropertyDefinitions(std::string prefix)
ctor
void shutdownAndCleanup()
Ice::Long getNumberOfCores(const Ice::Current &=Ice::emptyCurrent) const override
Returns the number of cores to use.
void onInitComponent() override
reads in properties
Ice::ObjectPrx registerPersistentObjectWithIdentity(const Ice::Identity &ident, const Ice::ObjectPtr ®istree, const Ice::Current &=Ice::emptyCurrent) override
ClientSideRemoteHandleControlBlockBasePtr createRemoteHandledComponent(const std::string &componentFactoryName, const std::string ®istrationName, const ComponentParameter ¶ms, const Ice::Current &=Ice::emptyCurrent) override
RemoteObjectNode()=default
ctor
Ice::ObjectPrx doRegisterPersistentManagedIceObjectAtRON(ManagedIceObjectPtrAndPrx mio)
IceObjectIdentityAndPrx setupIceObject(const Ice::ObjectPtr &ptr, Ice::Identity ident)
~RemoteObjectNode() override
dtor
Ice::ObjectPrx doRegisterPersistentIceObjectAtRON(IceObjectIdentityAndPrx io)
std::vector< ManagedIceObjectPtr > persistentManagedIceObjects
The persistent managed ice objects.
Ice::Long getNumberOfRemoteHandledObjects(const Ice::Current &=Ice::emptyCurrent) const override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Ice::Long getNumberOfObjects(const Ice::Current &=Ice::emptyCurrent) const override
Ice::ObjectPrx registerPersistentObject(const std::string ®istrationName, const Ice::ObjectPtr ®istree, const Ice::Current &=Ice::emptyCurrent) override
ClientSideRemoteHandleControlBlockBasePtr doRegisterRemoteHandledIceObjectAtRON(IceObjectIdentityAndPrx io)
ClientSideRemoteHandleControlBlockBasePtr doRegisterRemoteHandledManagedIceObjectAtRON(ManagedIceObjectPtrAndPrx mio)
ClientSideRemoteHandleControlBlockBasePtr registerRemoteHandledObjectWithIdentity(const Ice::Identity &ident, const Ice::ObjectPtr ®istree, const Ice::Current &=Ice::emptyCurrent) override
std::atomic_bool shuttingDown
static unsigned getDefaultCoreCount()
std::atomic< Ice::Long > nextRemoteHandledObjectId
Ice::IdentitySeq persistentIceObjectIdentities
The identities of persistent ice objects.
std::size_t coreCountUsed
The nuber of cores returned, when querried for it.
Ice::Long getNumberOfPersistentObjects(const Ice::Current &=Ice::emptyCurrent) const override
void onConnectComponent() override
Pure virtual hook for the subclass.
virtual void setCoreCount(int newCount)
Ice::StringSeq getKnownComponentFactories(const Ice::Current &=Ice::emptyCurrent) const override
ManagedIceObjectPtrAndPrx setupComponent(const std::string &componentFactoryName, const std::string ®istrationName, const ComponentParameter ¶ms)
ClientSideRemoteHandleControlBlockBasePtr registerRemoteHandledObject(const std::string ®istrationName, const Ice::ObjectPtr ®istree, const Ice::Current &=Ice::emptyCurrent) override
std::mutex dataMutex
mutex to protect the map
void removeRemoteHandledObject(Ice::Long id)
void onExitComponent() override
Removes all remote objects.
std::unordered_map< Ice::Long, RemoteHandleControlBlockPtr > remoteHandledObjects
the map of running objects
ManagedIceObjectPtrAndPrx setupManagedIceObject(ManagedIceObjectPtr mioPtr, std::string registrationName)
std::string getDefaultName() const override
Returns the object node's default name.
Ice::ObjectPrx createPersistentComponent(const std::string &componentFactoryName, const std::string ®istrationName, const ComponentParameter ¶ms, const Ice::Current &=Ice::emptyCurrent) override
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
IceInternal::Handle< ManagedIceObject > ManagedIceObjectPtr
IceInternal::Handle< RemoteObjectNode > RemoteObjectNodePtr
An ice handle for a RemoteObjectNodeComponent.