16#ifndef __Ice_ObjectAdapter_h__
17#define __Ice_ObjectAdapter_h__
44#ifndef ICE_IGNORE_VERSION
45# if ICE_INT_VERSION / 100 != 307
46# error Ice version mismatch!
48# if ICE_INT_VERSION % 100 >= 50
49# error Beta header file detected
51# if ICE_INT_VERSION % 100 < 11
52# error Ice patch level mismatch!
57# if defined(ICE_STATIC_LIBS)
59# elif defined(ICE_API_EXPORTS)
60# define ICE_API ICE_DECLSPEC_EXPORT
62# define ICE_API ICE_DECLSPEC_IMPORT
66#ifdef ICE_CPP11_MAPPING
99 virtual ::std::string
getName() const noexcept = 0;
601using ObjectAdapterPtr = ::std::shared_ptr<ObjectAdapter>;
618ICE_API LocalObject* upCast(ObjectAdapter*);
620typedef ::IceInternal::Handle< ObjectAdapter> ObjectAdapterPtr;
650class ICE_API ObjectAdapter :
public virtual LocalObject
654 typedef ObjectAdapterPtr PointerType;
656 virtual ~ObjectAdapter();
658#ifdef ICE_CPP11_COMPILER
659 ObjectAdapter() =
default;
660 ObjectAdapter(
const ObjectAdapter&) =
default;
661 ObjectAdapter& operator=(
const ObjectAdapter&) =
default;
675 virtual CommunicatorPtr getCommunicator() const
ICE_NOEXCEPT = 0;
684 virtual
void activate() = 0;
698 virtual
void hold() = 0;
708 virtual
void waitForHold() = 0;
781 virtual ObjectPrx add(const ObjectPtr& servant, const Identity&
id) = 0;
798 virtual ObjectPrx addFacet(const ObjectPtr& servant, const Identity&
id, const ::std::
string& facet) = 0;
814 virtual ObjectPrx addWithUUID(const ObjectPtr& servant) = 0;
831 virtual ObjectPrx addFacetWithUUID(const ObjectPtr& servant, const ::std::
string& facet) = 0;
866 virtual
void addDefaultServant(const ObjectPtr& servant, const ::std::
string& category) = 0;
881 virtual ObjectPtr remove(const Identity&
id) = 0;
894 virtual ObjectPtr removeFacet(const Identity&
id, const ::std::
string& facet) = 0;
907 virtual FacetMap removeAllFacets(const Identity&
id) = 0;
918 virtual ObjectPtr removeDefaultServant(const ::std::
string& category) = 0;
935 virtual ObjectPtr find(const Identity&
id) const = 0;
952 virtual ObjectPtr findFacet(const Identity&
id, const ::std::
string& facet) const = 0;
965 virtual FacetMap findAllFacets(const Identity&
id) const = 0;
980 virtual ObjectPtr findByProxy(const ObjectPrx& proxy) const = 0;
1023 virtual
void addServantLocator(const ServantLocatorPtr& locator, const ::std::
string& category) = 0;
1037 virtual ServantLocatorPtr removeServantLocator(const ::std::
string& category) = 0;
1051 virtual ServantLocatorPtr findServantLocator(const ::std::
string& category) const = 0;
1061 virtual ObjectPtr findDefaultServant(const ::std::
string& category) const = 0;
1075 virtual ObjectPrx createProxy(const Identity&
id) const = 0;
1085 virtual ObjectPrx createDirectProxy(const Identity&
id) const = 0;
1096 virtual ObjectPrx createIndirectProxy(const Identity&
id) const = 0;
1110 virtual
void setLocator(const LocatorPrx& loc) = 0;
1119 virtual LocatorPrx getLocator() const
ICE_NOEXCEPT = 0;
1126 virtual EndpointSeq getEndpoints() const
ICE_NOEXCEPT = 0;
1136 virtual
void refreshPublishedEndpoints() = 0;
1145 virtual EndpointSeq getPublishedEndpoints() const
ICE_NOEXCEPT = 0;
1154 virtual
void setPublishedEndpoints(const EndpointSeq& newEndpoints) = 0;
1158inline
bool operator==(const ObjectAdapter& lhs, const ObjectAdapter& rhs)
1160 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
1163inline bool operator<(
const ObjectAdapter& lhs,
const ObjectAdapter& rhs)
1165 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
#define ICE_API
Definition Config.h:197
#define ICE_NOEXCEPT
Definition Config.h:128
#define ICE_MEMBER(API)
Definition Config.h:177
The central object in Ice.
Definition Communicator.h:130
The Ice locator interface.
Definition Locator.h:517
The object adapter provides an up-call interface from the Ice run time to the implementation of Ice o...
Definition ObjectAdapter.h:90
virtual ::std::shared_ptr<::Ice::Object > remove(const Identity &id)=0
Remove a servant (that is, the default facet) from the object adapter's Active Servant Map.
virtual ::std::shared_ptr<::Ice::LocatorPrx > getLocator() const noexcept=0
Get the Ice locator used by this object adapter.
virtual ::std::shared_ptr<::Ice::Object > findFacet(const Identity &id, const ::std::string &facet) const =0
Like find, but with a facet.
virtual::Ice::EndpointSeq getPublishedEndpoints() const noexcept=0
Get the set of endpoints that proxies created by this object adapter will contain.
virtual bool isDeactivated() const noexcept=0
Check whether object adapter has been deactivated.
virtual ::std::shared_ptr<::Ice::Object > find(const Identity &id) const =0
Look up a servant in this object adapter's Active Servant Map by the identity of the Ice object it im...
virtual void activate()=0
Activate all endpoints that belong to this object adapter.
virtual ::std::shared_ptr<::Ice::ServantLocator > findServantLocator(const ::std::string &category) const =0
Find a Servant Locator installed with this object adapter.
virtual::Ice::FacetMap removeAllFacets(const Identity &id)=0
Remove all facets with the given identity from the Active Servant Map.
virtual void hold()=0
Temporarily hold receiving and dispatching requests.
virtual void addDefaultServant(const ::std::shared_ptr< Object > &servant, const ::std::string &category)=0
Add a default servant to handle requests for a specific category.
virtual ::std::shared_ptr<::Ice::Object > removeFacet(const Identity &id, const ::std::string &facet)=0
Like remove, but with a facet.
virtual ::std::shared_ptr<::Ice::ServantLocator > removeServantLocator(const ::std::string &category)=0
Remove a Servant Locator from this object adapter.
virtual void deactivate() noexcept=0
Deactivate all endpoints that belong to this object adapter.
virtual void destroy() noexcept=0
Destroys the object adapter and cleans up all resources held by the object adapter.
virtual void setLocator(const ::std::shared_ptr< LocatorPrx > &loc)=0
Set an Ice locator for this object adapter.
virtual ::std::shared_ptr<::Ice::ObjectPrx > addFacetWithUUID(const ::std::shared_ptr< Object > &servant, const ::std::string &facet)=0
Like addWithUUID, but with a facet.
virtual void waitForHold()=0
Wait until the object adapter holds requests.
virtual ::std::shared_ptr<::Ice::Communicator > getCommunicator() const noexcept=0
Get the communicator this object adapter belongs to.
virtual ::std::shared_ptr<::Ice::ObjectPrx > createDirectProxy(const Identity &id) const =0
Create a direct proxy for the object with the given identity.
virtual ::std::shared_ptr<::Ice::ObjectPrx > addWithUUID(const ::std::shared_ptr< Object > &servant)=0
Add a servant to this object adapter's Active Servant Map, using an automatically generated UUID as i...
virtual ::std::shared_ptr<::Ice::ObjectPrx > add(const ::std::shared_ptr< Object > &servant, const Identity &id)=0
Add a servant to this object adapter's Active Servant Map.
virtual void refreshPublishedEndpoints()=0
Refresh the set of published endpoints.
virtual ::std::shared_ptr<::Ice::ObjectPrx > addFacet(const ::std::shared_ptr< Object > &servant, const Identity &id, const ::std::string &facet)=0
Like add, but with a facet.
virtual void waitForDeactivate() noexcept=0
Wait until the object adapter has deactivated.
virtual::Ice::EndpointSeq getEndpoints() const noexcept=0
Get the set of endpoints configured with this object adapter.
virtual::Ice::FacetMap findAllFacets(const Identity &id) const =0
Find all facets with the given identity in the Active Servant Map.
virtual ::std::shared_ptr<::Ice::ObjectPrx > createProxy(const Identity &id) const =0
Create a proxy for the object with the given identity.
virtual ::std::shared_ptr<::Ice::ObjectPrx > createIndirectProxy(const Identity &id) const =0
Create an indirect proxy for the object with the given identity.
virtual void addServantLocator(const ::std::shared_ptr< ServantLocator > &locator, const ::std::string &category)=0
Add a Servant Locator to this object adapter.
virtual ::std::shared_ptr<::Ice::Object > findDefaultServant(const ::std::string &category) const =0
Find the default servant for a specific category.
virtual void setPublishedEndpoints(const EndpointSeq &newEndpoints)=0
Set of the endpoints that proxies created by this object adapter will contain.
virtual ::std::shared_ptr<::Ice::Object > findByProxy(const ::std::shared_ptr< ObjectPrx > &proxy) const =0
Look up a servant in this object adapter's Active Servant Map, given a proxy.
virtual::std::string getName() const noexcept=0
Get the name of this object adapter.
virtual ::std::shared_ptr<::Ice::Object > removeDefaultServant(const ::std::string &category)=0
Remove the default servant for a specific category.
Base class of all object proxies.
Definition Proxy.h:317
The base class for servants.
Definition Object.h:91
A servant locator is called by an object adapter to locate a servant that is not found in its active ...
Definition ServantLocator.h:76
Definition BuiltinSequences.h:56
::std::vector<::std::shared_ptr< Endpoint > > EndpointSeq
A sequence of endpoints.
Definition EndpointF.h:73
::std::map<::std::string, ::std::shared_ptr< Object > > FacetMap
A mapping from facet name to servant.
Definition FacetMap.h:61
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:136
The identity of an Ice object.
Definition Identity.h:67