blob: 7f5ba0da33683e0abad666e1144742708edd063d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
// **********************************************************************
//
// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
#ifndef ICE_LOCATOR_ICE
#define ICE_LOCATOR_ICE
#include <Ice/Identity.ice>
#include <Ice/ProcessF.ice>
module Ice
{
/**
*
* This exception is raised if an adapter cannot be found.
*
**/
exception AdapterNotFoundException
{
};
/**
*
* This exception is raised if a server tries to set endpoints for
* an adapter that is already active.
*
**/
exception AdapterAlreadyActiveException
{
};
/**
*
* This exception is raised if an object cannot be found.
*
**/
exception ObjectNotFoundException
{
};
/**
*
* This exception is raised if a server cannot be found.
*
**/
exception ServerNotFoundException
{
};
interface LocatorRegistry;
/**
*
* The &Ice; locator interface. This interface is used by clients to
* lookup adapters and objects. It is also used by servers to get the
* locator registry proxy.
*
* <note><para> The [Locator] interface is intended to be used by
* &Ice; internals and by locator implementations. Regular user code
* should not attempt to use any functionality of this interface
* directly.</para></note>
*
**/
interface Locator
{
/**
*
* Find an object by identity and return its proxy.
*
* @param id The identity.
*
* @return The proxy, or null if the object is not active.
*
* @throws ObjectNotFoundException Raised if the object cannot
* be found.
*
**/
["amd"] nonmutating Object* findObjectById(Ice::Identity id)
throws ObjectNotFoundException;
/**
*
* Find an adapter by id and return its proxy (a dummy direct
* proxy created by the adapter).
*
* @param id The adapter id.
*
* @return The adapter proxy, or null if the adapter is not active.
*
* @throws AdapterNotFoundException Raised if the adapter cannot be
* found.
*
**/
["amd"] nonmutating Object* findAdapterById(string id)
throws AdapterNotFoundException;
/**
*
* Get the locator registry.
*
* @return The locator registry.
*
**/
nonmutating LocatorRegistry* getRegistry();
};
/**
*
* The &Ice; locator registry interface. This interface is used by
* servers to register adapter endpoints with the locator.
*
* <note><para> The [LocatorRegistry] interface is intended to be used
* by &Ice; internals and by locator implementations. Regular user
* code should not attempt to use any functionality of this interface
* directly.</para></note>
*
**/
interface LocatorRegistry
{
/**
*
* Set the adapter endpoints with the locator registry.
*
* @param id The adapter id.
*
* @param proxy The adapter proxy (a dummy direct proxy created
* by the adapter). The direct proxy contains the adapter
* endpoints.
*
* @throws AdapterNotFoundException Raised if the adapter cannot
* be found, or if the locator only allows
* registered adapters to set their active proxy and the
* adapter is not registered with the locator.
*
* @throws AdapterAlreadyActive Raised if an adapter with the same
* id is already active.
*
**/
["amd"] idempotent void setAdapterDirectProxy(string id, Object* proxy)
throws AdapterNotFoundException, AdapterAlreadyActiveException;
/**
*
* Set the process proxy for a server.
*
* @param id The server id.
*
* @param proxy The process proxy.
*
* @throws ServerNotFoundException Raised if the server cannot
* be found.
*
**/
["amd"] idempotent void setServerProcessProxy(string id, Process* proxy)
throws ServerNotFoundException;
};
};
#endif
|