Ice 3.7 Slice API Reference
ObjectAdapter.ice
Go to the documentation of this file.
1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4 
5 #pragma once
6 
7 [["cpp:dll-export:ICE_API"]]
8 [["cpp:doxygen:include:Ice/Ice.h"]]
9 [["cpp:header-ext:h"]]
10 
11 [["ice-prefix"]]
12 
13 [["js:module:ice"]]
14 [["js:cjs-module"]]
15 
16 [["objc:dll-export:ICE_API"]]
17 [["objc:header-dir:objc"]]
18 
19 [["python:pkgdir:Ice"]]
20 
21 #include <Ice/CommunicatorF.ice>
22 #include <Ice/ServantLocatorF.ice>
23 #include <Ice/Locator.ice>
24 #include <Ice/Identity.ice>
25 #include <Ice/FacetMap.ice>
26 #include <Ice/Endpoint.ice>
27 
28 #ifndef __SLICE2JAVA_COMPAT__
29 [["java:package:com.zeroc"]]
30 #endif
31 
32 ["objc:prefix:ICE"]
33 module Ice
34 {
35 
49 local interface ObjectAdapter
50 {
58  ["cpp:const", "cpp:noexcept", "swift:noexcept"] string getName();
59 
69  ["cpp:const", "cpp:noexcept", "swift:noexcept", "swift:nonnull"] Communicator getCommunicator();
70 
81  ["js:async"] void activate();
82 
98  ["swift:noexcept"] void hold();
99 
111  ["swift:noexcept", "js:async"] void waitForHold();
112 
138  ["cpp:noexcept", "swift:noexcept", "js:async"] void deactivate();
139 
152  ["cpp:noexcept", "swift:noexcept", "js:async"] void waitForDeactivate();
153 
163  ["cpp:const", "cpp:noexcept", "swift:noexcept"] bool isDeactivated();
164 
179  ["cpp:noexcept", "swift:noexcept", "js:async"] void destroy();
180 
203  ["swift:nonnull", "swift:attribute:@discardableResult"]
204  Object* add(["swift:nonnull"] Object servant, ["objc:param:identity"] Identity id);
205 
228  ["swift:nonnull", "swift:attribute:@discardableResult"]
229  Object* addFacet(["swift:nonnull"] Object servant, ["objc:param:identity"] Identity id, string facet);
230 
250  ["swift:nonnull", "swift:attribute:@discardableResult"] Object* addWithUUID(["swift:nonnull"] Object servant);
251 
273  ["swift:nonnull", "swift:attribute:@discardableResult"] Object* addFacetWithUUID(["swift:nonnull"] Object servant, string facet);
274 
313  void addDefaultServant(["swift:nonnull"] Object servant, string category);
314 
333  ["swift:nonnull", "swift:attribute:@discardableResult"] Object remove(Identity id);
334 
352  ["swift:nonnull", "swift:attribute:@discardableResult"] Object removeFacet(Identity id, string facet);
353 
370  ["swift:attribute:@discardableResult"] FacetMap removeAllFacets(Identity id);
371 
386  ["swift:nonnull", "swift:attribute:@discardableResult"] Object removeDefaultServant(string category);
387 
408  ["swift:noexcept", "cpp:const"] Object find(Identity id);
409 
431  ["swift:noexcept", "cpp:const"] Object findFacet(Identity id, string facet);
432 
449  ["swift:noexcept", "cpp:const"] FacetMap findAllFacets(Identity id);
450 
469  ["swift:noexcept", "cpp:const"] Object findByProxy(["swift:nonnull"] Object* proxy);
470 
517  void addServantLocator(["swift:nonnull"] ServantLocator locator, string category);
518 
536  ["swift:nonnull", "swift:attribute:@discardableResult"] ServantLocator removeServantLocator(string category);
537 
555  ["swift:noexcept", "cpp:const"] ServantLocator findServantLocator(string category);
556 
570  ["swift:noexcept", "cpp:const"] Object findDefaultServant(string category);
571 
589  ["cpp:const", "swift:nonnull"] Object* createProxy(Identity id);
590 
604  ["cpp:const", "swift:nonnull"] Object* createDirectProxy(Identity id);
605 
620  ["cpp:const", "swift:nonnull"] Object* createIndirectProxy(Identity id);
621 
637  void setLocator(Locator* loc);
638 
649  ["cpp:const", "cpp:noexcept", "swift:noexcept"] Locator* getLocator();
650 
660  ["cpp:const", "cpp:noexcept", "swift:noexcept"] EndpointSeq getEndpoints();
661 
671  ["js:async"] void refreshPublishedEndpoints();
672 
684  ["cpp:const", "cpp:noexcept", "swift:noexcept"] EndpointSeq getPublishedEndpoints();
685 
697  void setPublishedEndpoints(EndpointSeq newEndpoints);
698 
699 #if defined(__SLICE2SWIFT__) || defined(ICE_SWIFT)
700  /*
701  * Returns the dispatch queue.
702  *
703  * @return The dispatch queue associated wih this Object Adapter.
704  **/
705  ["cpp:const", "swift:nonnull", "cpp:type:dispatch_queue_t", "swift:type:Dispatch.DispatchQueue"]
706  LocalObject getDispatchQueue();
707 #endif
708 }
709 
710 }
Ice::ObjectAdapter::findFacet
Object findFacet(Identity id, string facet)
Like find, but with a facet.
Ice::ObjectAdapter::setPublishedEndpoints
void setPublishedEndpoints(EndpointSeq newEndpoints)
Set of the endpoints that proxies created by this object adapter will contain.
Ice::ObjectAdapter::hold
void hold()
Temporarily hold receiving and dispatching requests.
Ice::ObjectAdapter::getEndpoints
EndpointSeq getEndpoints()
Get the set of endpoints configured with this object adapter.
Ice::ObjectAdapter::addWithUUID
Object * addWithUUID(["swift:nonnull"] Object servant)
Add a servant to this object adapter's Active Servant Map, using an automatically generated UUID as i...
Ice::ObjectAdapter::destroy
void destroy()
Destroys the object adapter and cleans up all resources held by the object adapter.
Ice::ObjectAdapter
The object adapter provides an up-call interface from the Ice run time to the implementation of Ice o...
Definition: ObjectAdapter.ice:50
Ice::ObjectAdapter::isDeactivated
bool isDeactivated()
Check whether object adapter has been deactivated.
Ice::FacetMap
FacetMap
A mapping from facet name to servant.
Definition: FacetMap.ice:34
Ice::ObjectAdapter::createProxy
Object * createProxy(Identity id)
Create a proxy for the object with the given identity.
Ice::Communicator
The central object in Ice.
Definition: Communicator.ice:68
Ice::ObjectAdapter::findServantLocator
ServantLocator findServantLocator(string category)
Find a Servant Locator installed with this object adapter.
Ice::ObjectAdapter::find
Object find(Identity id)
Look up a servant in this object adapter's Active Servant Map by the identity of the Ice object it im...
ServantLocatorF.ice
CommunicatorF.ice
Ice::ObjectAdapter::removeFacet
Object removeFacet(Identity id, string facet)
Like remove, but with a facet.
Ice::ObjectAdapter::addServantLocator
void addServantLocator(["swift:nonnull"] ServantLocator locator, string category)
Add a Servant Locator to this object adapter.
Ice::ObjectAdapter::removeServantLocator
ServantLocator removeServantLocator(string category)
Remove a Servant Locator from this object adapter.
FacetMap.ice
Ice::ObjectAdapter::findByProxy
Object findByProxy(["swift:nonnull"] Object *proxy)
Look up a servant in this object adapter's Active Servant Map, given a proxy.
Ice::ObjectAdapter::getName
string getName()
Get the name of this object adapter.
Ice::ObjectAdapter::add
Object * add(["swift:nonnull"] Object servant, ["objc:param:identity"] Identity id)
Add a servant to this object adapter's Active Servant Map.
Ice::ObjectAdapter::createIndirectProxy
Object * createIndirectProxy(Identity id)
Create an indirect proxy for the object with the given identity.
Ice::ObjectAdapter::refreshPublishedEndpoints
void refreshPublishedEndpoints()
Refresh the set of published endpoints.
Ice::ObjectAdapter::addFacet
Object * addFacet(["swift:nonnull"] Object servant, ["objc:param:identity"] Identity id, string facet)
Like add, but with a facet.
Ice::ObjectAdapter::activate
void activate()
Activate all endpoints that belong to this object adapter.
Ice::ObjectAdapter::createDirectProxy
Object * createDirectProxy(Identity id)
Create a direct proxy for the object with the given identity.
Ice::ObjectAdapter::addFacetWithUUID
Object * addFacetWithUUID(["swift:nonnull"] Object servant, string facet)
Like addWithUUID, but with a facet.
Ice::EndpointSeq
local sequence< Endpoint > EndpointSeq
A sequence of endpoints.
Definition: EndpointF.ice:41
Ice::ServantLocator
A servant locator is called by an object adapter to locate a servant that is not found in its active ...
Definition: ServantLocator.ice:43
Locator.ice
Ice::ObjectAdapter::findDefaultServant
Object findDefaultServant(string category)
Find the default servant for a specific category.
Ice::ObjectAdapter::getPublishedEndpoints
EndpointSeq getPublishedEndpoints()
Get the set of endpoints that proxies created by this object adapter will contain.
Ice::ObjectAdapter::waitForDeactivate
void waitForDeactivate()
Wait until the object adapter has deactivated.
Ice::ObjectAdapter::setLocator
void setLocator(Locator *loc)
Set an Ice locator for this object adapter.
Ice
The Ice core library.
Definition: BuiltinSequences.ice:27
Ice::ObjectAdapter::getLocator
Locator * getLocator()
Get the Ice locator used by this object adapter.
Ice::ObjectAdapter::removeAllFacets
FacetMap removeAllFacets(Identity id)
Remove all facets with the given identity from the Active Servant Map.
Ice::ObjectAdapter::getCommunicator
Communicator getCommunicator()
Get the communicator this object adapter belongs to.
Ice::ObjectAdapter::waitForHold
void waitForHold()
Wait until the object adapter holds requests.
Ice::ObjectAdapter::addDefaultServant
void addDefaultServant(["swift:nonnull"] Object servant, string category)
Add a default servant to handle requests for a specific category.
Identity.ice
Endpoint.ice
Ice::Locator
The Ice locator interface.
Definition: Locator.ice:94
Ice::ObjectAdapter::findAllFacets
FacetMap findAllFacets(Identity id)
Find all facets with the given identity in the Active Servant Map.
Ice::Identity
The identity of an Ice object.
Definition: Identity.ice:40
Ice::ObjectAdapter::removeDefaultServant
Object removeDefaultServant(string category)
Remove the default servant for a specific category.
Ice::ObjectAdapter::deactivate
void deactivate()
Deactivate all endpoints that belong to this object adapter.