Ice 3.9
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#ifdef __ICERPC__
16["cs:identifier:IceRpc.Ice"]
17#endif
18["java:identifier:com.zeroc.Ice"]
19module Ice
20{
21 /// The exception that is thrown by a {@link Locator} implementation when it cannot find an object adapter.
23 {
24 }
25
26 /// The exception that is thrown by a {@link Locator} implementation when it cannot find an object.
28 {
29 }
30
31 interface LocatorRegistry;
32
33 /// Client applications use the Locator object to resolve Ice indirect proxies. This object also allows
34 /// server applications to retrieve a proxy to the associated {@link LocatorRegistry} object where they can register
35 /// their object adapters.
36 interface Locator
37 {
38 /// Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this
39 /// object. This dummy proxy may be an indirect proxy that requires further resolution using
40 /// {@link findAdapterById}.
41 /// @param id The identity.
42 /// @return A dummy proxy, or null if an object with the requested identity was not found.
43 /// @throws ObjectNotFoundException Thrown when an object with the requested identity was not found. The caller
44 /// should treat this exception like a null return value.
45 ["cpp:const"]
46 idempotent Object* findObjectById(Identity id)
48
49 /// Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
50 /// @param id The adapter ID.
51 /// @return A dummy proxy with the adapter's endpoints, or null if an object adapter with @p id was not found.
52 /// @throws AdapterNotFoundException Thrown when an object adapter with this adapter ID was not found. The
53 /// caller should treat this exception like a null return value.
54 ["cpp:const"]
55 idempotent Object* findAdapterById(string id)
57
58 /// Gets a proxy to the locator registry.
59 /// @return A proxy to the locator registry, or null if this locator has no associated registry.
60 ["cpp:const"]
62 }
63
64 /// Provides access to a {@link Locator} object via a fixed identity.
65 /// A LocatorFinder is always registered with identity `Ice/LocatorFinder`. This allows clients to obtain the
66 /// associated Locator proxy with just the endpoint information of the object. For example, you can use the
67 /// LocatorFinder proxy `Ice/LocatorFinder:tcp -h somehost -p 4061` to get the Locator proxy
68 /// `MyIceGrid/Locator:tcp -h somehost -p 4061`.
69 interface LocatorFinder
70 {
71 /// Gets a proxy to the associated {@link Locator}. The proxy might point to several replicas.
72 /// @return The locator proxy. This proxy is never null.
74 }
75}
The exception that is thrown by a Locator implementation when it cannot find an object adapter.
Definition Locator.ice:23
The exception that is thrown by a Locator implementation when it cannot find an object.
Definition Locator.ice:28
Locator * getLocator()
Gets a proxy to the associated Locator.
Provides access to a Locator object via a fixed identity.
Definition Locator.ice:70
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 endpoint(s) that can be used to reach this...
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:37
The Ice RPC framework.
Represents the identity of an Ice object.
Definition Identity.ice:29