Ice 3.8
Slice API Reference
Loading...
Searching...
No Matches
Locator.ice
1// Copyright (c) ZeroC, Inc.
2
3#pragma once
4
5[["cpp:dll-export:ICE_API"]]
6[["cpp:doxygen:include:Ice/Ice.h"]]
7[["cpp:header-ext:h"]]
8
9[["cpp:source-include:Ice/LocatorRegistry.h"]]
10
11[["js:module:@zeroc/ice"]]
12
13#include "Identity.ice"
14
15["java:identifier:com.zeroc.Ice"]
16module Ice
17{
18 /// The exception that is thrown by a {@link Locator} implementation when it cannot find an object adapter with the
19 /// provided adapter ID.
21 {
22 }
23
24 /// The exception that is thrown by a {@link Locator} implementation when it cannot find an object with the provided
25 /// identity.
27 {
28 }
29
30 interface LocatorRegistry;
31
32 /// Client applications use the Locator object to resolve Ice indirect proxies. This object also allows
33 /// server applications to retrieve a proxy to the associated {@link LocatorRegistry} object where they can register
34 /// their object adapters.
35 interface Locator
36 {
37 /// Finds an object by identity and returns a dummy proxy with the endpoint(s) that can be used to reach this
38 /// object. This dummy proxy may be an indirect proxy that requires further resolution using
39 /// {@link findAdapterById}.
40 /// @param id The identity.
41 /// @return A dummy proxy, or null if an object with the requested identity was not found.
42 /// @throws ObjectNotFoundException Thrown when an object with the requested identity was not found. The caller
43 /// should treat this exception like a null return value.
44 ["amd"] ["cpp:const"]
45 idempotent Object* findObjectById(Identity id)
47
48 /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
49 /// @param id The adapter ID.
50 /// @return A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found.
51 /// @throws AdapterNotFoundException Thrown when an object adapter with this adapter ID was not found. The
52 /// caller should treat this exception like a null return value.
53 ["amd"] ["cpp:const"]
54 idempotent Object* findAdapterById(string id)
56
57 /// Gets a proxy to the locator registry.
58 /// @return A proxy to the locator registry, or null if this locator has no associated registry.
59 ["cpp:const"]
61 }
62
63 /// Provides access to a {@link Locator} object via a fixed identity.
64 /// A LocatorFinder is always registered with identity `Ice/LocatorFinder`. This allows clients to obtain the
65 /// associated Locator proxy with just the endpoint information of the object. For example, you can use the
66 /// LocatorFinder proxy `Ice/LocatorFinder:tcp -h somehost -p 4061` to get the Locator proxy
67 /// `MyIceGrid/Locator:tcp -h somehost -p 4061`.
68 interface LocatorFinder
69 {
70 /// Gets a proxy to the associated {@link Locator}. The proxy might point to several replicas.
71 /// @return The locator proxy. This proxy is never null.
73 }
74}
The exception that is thrown by a Locator implementation when it cannot find an object adapter with t...
Definition Locator.ice:21
The exception that is thrown by a Locator implementation when it cannot find an object with the provi...
Definition Locator.ice:27
Locator * getLocator()
Gets a proxy to the associated Locator.
Provides access to a Locator object via a fixed identity.
Definition Locator.ice:69
A server application registers the endpoints of its indirect object adapters with the LocatorRegistry...
idempotent Object * findObjectById(Identity id)
Finds an object by identity and returns a dummy proxy with the endpoint(s) that can be used to reach ...
idempotent Object * findAdapterById(string id)
Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s)...
idempotent LocatorRegistry * getRegistry()
Gets a proxy to the locator registry.
Client applications use the Locator object to resolve Ice indirect proxies.
Definition Locator.ice:36
The Ice RPC framework.
Represents the identity of an Ice object.
Definition Identity.ice:26