Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Ice::ObjectAdapter Class Referenceabstract

An object adapter is the main server-side Ice API. More...

#include <Ice/Ice.h>

Public Member Functions

virtual void activate ()=0
 Starts receiving and dispatching requests received over incoming connections.
template<typename Prx = ObjectPrx, std::enable_if_t< std::is_base_of_v< ObjectPrx, Prx >, bool > = true>
Prx add (const ObjectPtr &servant, const Identity &id)
 Adds a servant to this object adapter's Active Servant Map (ASM).
virtual void addDefaultServant (ObjectPtr servant, std::string category)=0
 Adds a default servant to handle requests for a specific category.
template<typename Prx = ObjectPrx, std::enable_if_t< std::is_base_of_v< ObjectPrx, Prx >, bool > = true>
Prx addFacet (ObjectPtr servant, Identity id, std::string facet)
 Adds a servant to this object adapter's Active Servant Map (ASM), while specifying a facet.
template<typename Prx = ObjectPrx, std::enable_if_t< std::is_base_of_v< ObjectPrx, Prx >, bool > = true>
Prx addFacetWithUUID (ObjectPtr servant, std::string facet)
 Adds a servant to this object adapter's Active Servant Map (ASM), using an automatically generated UUID as its identity.
virtual void addServantLocator (ServantLocatorPtr locator, std::string category)=0
 Adds a ServantLocator to this object adapter for a specific category.
template<typename Prx = ObjectPrx, std::enable_if_t< std::is_base_of_v< ObjectPrx, Prx >, bool > = true>
Prx addWithUUID (ObjectPtr servant)
 Adds a servant to this object adapter's Active Servant Map (ASM), using an automatically generated UUID as its identity.
template<typename Prx = ObjectPrx, std::enable_if_t< std::is_base_of_v< ObjectPrx, Prx >, bool > = true>
Prx createDirectProxy (Identity id)
 Creates a direct proxy from an Ice identity.
template<typename Prx = ObjectPrx, std::enable_if_t< std::is_base_of_v< ObjectPrx, Prx >, bool > = true>
Prx createIndirectProxy (Identity id)
 Creates an indirect proxy for an Ice identity.
template<typename Prx = ObjectPrx, std::enable_if_t< std::is_base_of_v< ObjectPrx, Prx >, bool > = true>
Prx createProxy (Identity id)
 Creates a proxy from an Ice identity.
virtual void deactivate () noexcept=0
 Deactivates this object adapter: stops accepting new connections from clients and closes gracefully all incoming connections created by this object adapter once all outstanding dispatches have completed.
virtual void destroy () noexcept=0
 Destroys this object adapter and cleans up all resources associated with it.
virtual const ObjectPtrdispatchPipeline () const noexcept=0
 Gets the dispatch pipeline of this object adapter.
virtual ObjectPtr find (const Identity &id) const =0
 Looks up a servant.
virtual FacetMap findAllFacets (const Identity &id) const =0
 Finds all facets for a given identity in the Active Servant Map.
virtual ObjectPtr findByProxy (const ObjectPrx &proxy) const =0
 Looks up a servant with an identity and a facet.
virtual ObjectPtr findDefaultServant (std::string_view category) const =0
 Finds the default servant for a specific category.
virtual ObjectPtr findFacet (const Identity &id, std::string_view facet) const =0
 Looks up a servant with an identity and facet.
virtual ServantLocatorPtr findServantLocator (std::string_view category) const =0
 Finds a ServantLocator registered with this object adapter.
virtual CommunicatorPtr getCommunicator () const noexcept=0
 Gets the communicator that created this object adapter.
virtual EndpointSeq getEndpoints () const =0
 Gets the set of endpoints configured on this object adapter.
virtual std::optional< LocatorPrxgetLocator () const noexcept=0
 Gets the Ice locator used by this object adapter.
virtual const std::string & getName () const noexcept=0
 Gets the name of this object adapter.
virtual EndpointSeq getPublishedEndpoints () const =0
 Gets the set of endpoints that proxies created by this object adapter will contain.
virtual void hold ()=0
 Stops reading requests from incoming connections.
virtual bool isDeactivated () const noexcept=0
 Checks whether or not deactivate was called on this object adapter.
virtual ObjectPtr remove (const Identity &id)=0
 Removes a servant from the object adapter's Active Servant Map.
virtual FacetMap removeAllFacets (const Identity &id)=0
 Removes all facets with the given identity from the Active Servant Map.
virtual ObjectPtr removeDefaultServant (std::string_view category)=0
 Removes the default servant for a specific category.
virtual ObjectPtr removeFacet (const Identity &id, std::string_view facet)=0
 Removes a servant from the object adapter's Active Servant Map, while specifying a facet.
virtual ServantLocatorPtr removeServantLocator (std::string_view category)=0
 Removes a ServantLocator from this object adapter.
virtual void setLocator (std::optional< LocatorPrx > loc)=0
 Sets an Ice locator on this object adapter.
virtual void setPublishedEndpoints (EndpointSeq newEndpoints)=0
 Sets the endpoints that proxies created by this object adapter will contain.
virtual ObjectAdapterPtr use (std::function< ObjectPtr(ObjectPtr)> middlewareFactory)=0
 Adds a middleware to the dispatch pipeline of this object adapter.
virtual void waitForDeactivate () noexcept=0
 Waits until deactivate is called on this object adapter and all connections accepted by this object adapter are closed.
virtual void waitForHold ()=0
 Waits until the object adapter is in the holding state (see hold) and the dispatch of requests received over incoming connection has completed.

Detailed Description

An object adapter is the main server-side Ice API.

It has two main purposes:

  • accept incoming connections from clients and dispatch requests received over these connections (see activate); and
  • maintain a dispatch pipeline and servants that handle the requests (see add, addDefaultServant, and use).

An object adapter can dispatch "bidirectional requests"–requests it receives over an outgoing connection instead of a more common incoming connection. It can also dispatch collocated requests (with no connection at all).

See also
Communicator::createObjectAdapter

Definition at line 31 of file ObjectAdapter.h.


The documentation for this class was generated from the following file: