zeroc-ice 3.8.0__cp313-cp313-macosx_10_13_universal2.whl → 3.8.0.post1__cp313-cp313-macosx_10_13_universal2.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. Ice/BTEndpointType.py +7 -0
  2. Ice/BTSEndpointType.py +7 -0
  3. Ice/Blobject.py +1 -1
  4. Ice/Communicator.py +130 -118
  5. Ice/CompressBatch.py +12 -12
  6. Ice/Current.py +5 -6
  7. Ice/EndpointSelectionType.py +8 -8
  8. Ice/EventLoopAdapter.py +4 -4
  9. Ice/Exception.py +6 -8
  10. Ice/FormatType.py +8 -1
  11. Ice/Future.py +78 -78
  12. Ice/IcePyTypes.py +2 -0
  13. Ice/ImplicitContext.py +28 -35
  14. Ice/InitializationData.py +23 -22
  15. Ice/InvocationFuture.py +31 -34
  16. Ice/LocalException.py +1 -1
  17. Ice/LocalExceptions.py +82 -94
  18. Ice/LogMessageType.py +16 -15
  19. Ice/Logger.py +10 -10
  20. Ice/Object.py +22 -17
  21. Ice/ObjectAdapter.py +200 -167
  22. Ice/ObjectPrx.py +196 -202
  23. Ice/OperationMode.py +19 -14
  24. Ice/ProcessLogger.py +18 -2
  25. Ice/Properties.py +63 -79
  26. Ice/Proxy.py +73 -10
  27. Ice/ReplyStatus.py +42 -35
  28. Ice/SSLEndpointType.py +7 -0
  29. Ice/ServantLocator.py +30 -35
  30. Ice/SliceInfo.py +3 -3
  31. Ice/SlicedData.py +1 -1
  32. Ice/TCPEndpointType.py +7 -0
  33. Ice/ToStringMode.py +19 -19
  34. Ice/UDPEndpointType.py +7 -0
  35. Ice/URIEndpointType.py +7 -0
  36. Ice/UnknownSlicedValue.py +11 -3
  37. Ice/UserException.py +1 -1
  38. Ice/Util.py +27 -26
  39. Ice/Value.py +7 -7
  40. Ice/WSEndpointType.py +7 -0
  41. Ice/WSSEndpointType.py +7 -0
  42. Ice/__init__.py +2 -0
  43. Ice/iAPEndpointType.py +7 -0
  44. Ice/iAPSEndpointType.py +7 -0
  45. IceGrid/LoadSample.py +12 -12
  46. IceGrid/ServerState.py +29 -25
  47. IcePy-stubs/__init__.pyi +151 -152
  48. IcePy.cpython-313-darwin.so +0 -0
  49. {zeroc_ice-3.8.0.dist-info → zeroc_ice-3.8.0.post1.dist-info}/METADATA +1 -1
  50. {zeroc_ice-3.8.0.dist-info → zeroc_ice-3.8.0.post1.dist-info}/RECORD +53 -53
  51. {zeroc_ice-3.8.0.dist-info → zeroc_ice-3.8.0.post1.dist-info}/WHEEL +0 -0
  52. {zeroc_ice-3.8.0.dist-info → zeroc_ice-3.8.0.post1.dist-info}/entry_points.txt +0 -0
  53. {zeroc_ice-3.8.0.dist-info → zeroc_ice-3.8.0.post1.dist-info}/top_level.txt +0 -0
Ice/ObjectAdapter.py CHANGED
@@ -9,6 +9,7 @@ import IcePy
9
9
 
10
10
  if TYPE_CHECKING:
11
11
  from .Communicator import Communicator
12
+ from .IcePyTypes import Endpoint
12
13
  from .Identity import Identity
13
14
  from .Locator import LocatorPrx
14
15
  from .Object import Object
@@ -19,10 +20,13 @@ if TYPE_CHECKING:
19
20
  @final
20
21
  class ObjectAdapter:
21
22
  """
22
- The object adapter provides an up-call interface from the Ice runtime to the implementation of Ice objects.
23
+ An object adapter is the main server-side Ice API. It has two main purposes:
24
+ - accept incoming connections from clients and dispatch requests received over these connections (see
25
+ :func:`activate`); and
26
+ - maintain servants that handle the requests (see :func:`add`, :func:`addDefaultServant`).
23
27
 
24
- The object adapter is responsible for receiving requests from endpoints, and for mapping between servants,
25
- identities, and proxies.
28
+ An object adapter can dispatch "bidirectional requests"--requests it receives over an outgoing connection
29
+ instead of a more common incoming connection. It can also dispatch collocated requests (with no connection at all).
26
30
  """
27
31
 
28
32
  def __init__(self, impl: IcePy.ObjectAdapter):
@@ -30,51 +34,59 @@ class ObjectAdapter:
30
34
 
31
35
  def getName(self) -> str:
32
36
  """
33
- Get the name of this object adapter.
37
+ Gets the name of this object adapter.
34
38
 
35
39
  Returns
36
40
  -------
37
41
  str
38
- The name of this object adapter.
42
+ This object adapter's name.
39
43
  """
40
44
  return self._impl.getName()
41
45
 
42
46
  def getCommunicator(self) -> Communicator:
43
47
  """
44
- Get the communicator this object adapter belongs to.
48
+ Gets the communicator that created this object adapter.
45
49
 
46
50
  Returns
47
51
  -------
48
52
  Communicator
49
- The communicator this object adapter belongs to.
53
+ This object adapter's communicator.
50
54
  """
51
55
  communicator = self._impl.getCommunicator()
52
56
  return communicator._getWrapper()
53
57
 
54
58
  def activate(self) -> None:
55
59
  """
56
- Activate all endpoints that belong to this object adapter.
60
+ Starts receiving and dispatching requests received over incoming connections.
57
61
 
58
- After activation, the object adapter can dispatch requests received through its endpoints.
62
+ Notes
63
+ -----
64
+ When this object adapter is an indirect object adapter configured with a locator proxy, this
65
+ function also registers the object adapter's published endpoints with this locator.
59
66
  """
60
67
  self._impl.activate()
61
68
 
62
69
  def hold(self) -> None:
63
70
  """
64
- Temporarily hold receiving and dispatching requests.
71
+ Stops reading requests from incoming connections. Outstanding dispatches are not affected.
72
+ The object adapter can be reactivated with :func:`activate`.
65
73
 
66
- The object adapter can be reactivated with the `activate` operation. Holding is not immediate;
67
- i.e., after `hold` returns, the object adapter might still be active for some time.
68
- You can use `waitForHold` to wait until holding is complete.
74
+ Notes
75
+ -----
76
+ This function is provided for backward compatibility with older versions of Ice.
77
+ Don't use it in new applications.
69
78
  """
70
79
  self._impl.hold()
71
80
 
72
81
  def waitForHold(self) -> None:
73
82
  """
74
- Wait until the object adapter holds requests.
83
+ Waits until the object adapter is in the holding state (see :func:`hold`) and the dispatch of requests received
84
+ over incoming connections has completed.
75
85
 
76
- Calling `hold` initiates holding of requests, and `waitForHold` only returns when holding of requests has been
77
- completed.
86
+ Notes
87
+ -----
88
+ This function is provided for backward compatibility with older versions of Ice.
89
+ Don't use it in new applications.
78
90
  """
79
91
  # If invoked by the main thread, waitForHold only blocks for the specified timeout in order to give us a chance
80
92
  # to handle signals.
@@ -83,22 +95,20 @@ class ObjectAdapter:
83
95
 
84
96
  def deactivate(self) -> None:
85
97
  """
86
- Deactivates this object adapter: stop accepting new connections from clients and close gracefully all incoming
87
- connections created by this object adapter once all outstanding dispatches have completed.
98
+ Deactivates this object adapter: stops accepting new connections from clients and closes gracefully all
99
+ incoming connections created by this object adapter once all outstanding dispatches have completed.
100
+ If this object adapter is indirect, this function also unregisters the object adapter from the locator
101
+ (see :func:`activate`).
88
102
 
89
- If this object adapter is indirect, this method also unregisters the object adapter from the Locator.
90
- This method does not cancel outstanding dispatches--it lets them execute until completion. A new incoming
91
- request on an existing connection will be accepted and can delay the closure of the connection.
103
+ This function does not cancel outstanding dispatches: it lets them execute until completion.
92
104
  A deactivated object adapter cannot be reactivated again; it can only be destroyed.
93
105
  """
94
106
  self._impl.deactivate()
95
107
 
96
108
  def waitForDeactivate(self) -> None:
97
109
  """
98
- Wait until `deactivate` is called on this object adapter and all connections accepted by this object adapter are
99
- closed.
100
-
101
- A connection is closed only after all outstanding dispatches on this connection have completed.
110
+ Waits until :func:`deactivate` is called on this object adapter and all connections accepted by this object adapter
111
+ are closed. A connection is closed only after all outstanding dispatches on this connection have completed.
102
112
  """
103
113
  # If invoked by the main thread, waitForDeactivate only blocks for the specified timeout in order to give us a
104
114
  # chance to handle signals.
@@ -107,29 +117,30 @@ class ObjectAdapter:
107
117
 
108
118
  def isDeactivated(self) -> bool:
109
119
  """
110
- Checks if this object adapter has been deactivated.
120
+ Checks whether or not :func:`deactivate` was called on this object adapter.
111
121
 
112
122
  Returns
113
123
  -------
114
124
  bool
115
- True if `deactivate` has been called on this object adapter; otherwise, False.
125
+ ``True`` if :func:`deactivate` has been called on this object adapter, ``False`` otherwise.
116
126
  """
117
127
  return self._impl.isDeactivated()
118
128
 
119
129
  def destroy(self) -> None:
120
130
  """
121
- Destroys this object adapter and cleans up all resources held by this object adapter.
122
-
123
- Once this method has returned, it is possible to create another object adapter with the same name.
131
+ Destroys this object adapter and cleans up all resources associated with it.
132
+ Once this function has returned, you can recreate another object adapter with the same name.
124
133
  """
125
134
  self._impl.destroy()
126
135
 
127
136
  def add(self, servant: Object, id: Identity) -> ObjectPrx:
128
137
  """
129
- Add a servant to this object adapter's Active Servant Map.
138
+ Adds a servant to this object adapter's Active Servant Map (ASM).
139
+ The ASM is a map {identity, facet} -> servant.
130
140
 
131
- Note that one servant can implement several Ice objects by registering the servant with multiple identities.
132
- Adding a servant with an identity that is already in the map throws `AlreadyRegisteredException`.
141
+ Notes
142
+ -----
143
+ This function is equivalent to calling :func:`addFacet` with an empty facet.
133
144
 
134
145
  Parameters
135
146
  ----------
@@ -141,15 +152,19 @@ class ObjectAdapter:
141
152
  Returns
142
153
  -------
143
154
  ObjectPrx
144
- A proxy that matches the given identity and this object adapter.
155
+ A proxy for ``id``, created by this object adapter.
156
+
157
+ Raises
158
+ ------
159
+ AlreadyRegisteredException
160
+ If a servant with the same identity is already registered.
145
161
  """
146
162
  return self._impl.add(servant, id)
147
163
 
148
164
  def addFacet(self, servant: Object, id: Identity, facet: str = "") -> ObjectPrx:
149
165
  """
150
- Add a servant with a facet to this object adapter's Active Servant Map.
151
-
152
- Calling `add(servant, id)` is equivalent to calling `addFacet` with an empty facet.
166
+ Adds a servant to this object adapter's Active Servant Map (ASM), while specifying a facet.
167
+ The ASM is a map {identity, facet} -> servant.
153
168
 
154
169
  Parameters
155
170
  ----------
@@ -157,21 +172,25 @@ class ObjectAdapter:
157
172
  The servant to add.
158
173
  id : Identity
159
174
  The identity of the Ice object that is implemented by the servant.
160
- facet : str
161
- The facet. An empty facet means the default facet.
175
+ facet : str, optional
176
+ The facet of the Ice object that is implemented by the servant.
162
177
 
163
178
  Returns
164
179
  -------
165
180
  ObjectPrx
166
- A proxy that matches the given identity, facet, and this object adapter.
181
+ A proxy for ``id`` and ``facet``, created by this object adapter.
182
+
183
+ Raises
184
+ ------
185
+ AlreadyRegisteredException
186
+ If a servant with the same identity and facet is already registered.
167
187
  """
168
188
  return self._impl.addFacet(servant, id, facet)
169
189
 
170
190
  def addWithUUID(self, servant: Object) -> ObjectPrx:
171
191
  """
172
- Add a servant to this object adapter's Active Servant Map, using an automatically generated UUID as its identity.
173
-
174
- Note that the generated UUID identity can be accessed using the proxy's `ice_getIdentity` operation.
192
+ Adds a servant to this object adapter's Active Servant Map (ASM),
193
+ using an automatically generated UUID as its identity.
175
194
 
176
195
  Parameters
177
196
  ----------
@@ -181,80 +200,85 @@ class ObjectAdapter:
181
200
  Returns
182
201
  -------
183
202
  ObjectPrx
184
- A proxy that matches the generated UUID identity and this object adapter.
203
+ A proxy with the generated UUID identity created by this object adapter.
185
204
  """
186
205
  return self._impl.addWithUUID(servant)
187
206
 
188
207
  def addFacetWithUUID(self, servant: Object, facet: str) -> ObjectPrx:
189
208
  """
190
- Add a servant with a facet to this object adapter's Active Servant Map, using an automatically generated UUID as its identity.
191
-
192
- Calling `addWithUUID(servant)` is equivalent to calling `addFacetWithUUID` with an empty facet.
209
+ Adds a servant to this object adapter's Active Servant Map (ASM),
210
+ using an automatically generated UUID as its identity. Also specifies a facet.
193
211
 
194
212
  Parameters
195
213
  ----------
196
214
  servant : Object
197
215
  The servant to add.
198
216
  facet : str
199
- The facet. An empty facet means the default facet.
217
+ The facet of the Ice object that is implemented by the servant.
200
218
 
201
219
  Returns
202
220
  -------
203
221
  ObjectPrx
204
- A proxy that matches the generated UUID identity, facet, and this object adapter.
222
+ A proxy with the generated UUID identity and the specified facet.
205
223
  """
206
224
  return self._impl.addFacetWithUUID(servant, facet)
207
225
 
208
226
  def addDefaultServant(self, servant: Object, category: str) -> None:
209
227
  """
210
- Add a default servant to handle requests for a specific category.
211
-
212
- Adding a default servant for a category for which a default servant is already registered throws
213
- `AlreadyRegisteredException`. To dispatch operation calls on servants, the object adapter tries to
214
- find a servant for a given Ice object identity and facet in the following order:
215
-
216
- 1. The object adapter tries to find a servant for the identity and facet in the Active Servant Map.
217
- 2. If no servant has been found in the Active Servant Map, the object adapter tries to find a default servant
218
- for the category component of the identity.
219
- 3. If no servant has been found by any of the preceding steps, the object adapter tries to find a default servant
220
- for an empty category, regardless of the category contained in the identity.
221
- 4. If no servant has been found by any of the preceding steps, the object adapter gives up and the caller
222
- receives `ObjectNotExistException` or `FacetNotExistException`.
223
-
228
+ Adds a default servant to handle requests for a specific category. When an object adapter dispatches an
229
+ incoming request, it tries to find a servant for the identity and facet carried by the request in the
230
+ following order:
231
+ - The object adapter tries to find a servant for the identity and facet in the Active Servant Map.
232
+ - If this fails, the object adapter tries to find a default servant for the category component of the
233
+ identity.
234
+ - If this fails, the object adapter tries to find a default servant for the empty category, regardless of
235
+ the category contained in the identity.
236
+ - If this fails, the object adapter tries to find a servant locator for the category component of the
237
+ identity. If there is no such servant locator, the object adapter tries to find a servant locator for the
238
+ empty category.
239
+ - If a servant locator is found, the object adapter tries to find a servant using this servant locator.
240
+ - If all the previous steps fail, the object adapter gives up and the caller receives an
241
+ :class:`ObjectNotExistException` or a :class:`FacetNotExistException`.
224
242
 
225
243
  Parameters
226
244
  ----------
227
245
  servant : Object
228
- The default servant.
246
+ The default servant to add.
229
247
  category : str
230
- The category for which the default servant is registered. An empty category means it will handle all categories.
248
+ The category for which the default servant is registered.
249
+ The empty category means it handles all categories.
250
+
251
+ Raises
252
+ ------
253
+ AlreadyRegisteredException
254
+ If a default servant with the same category is already registered.
231
255
  """
232
256
  self._impl.addDefaultServant(servant, category)
233
257
 
234
258
  def remove(self, id: Identity) -> Object:
235
259
  """
236
- Remove a servant (that is, the default facet) from the object adapter's Active Servant Map.
237
-
238
- Removing an identity that is not in the map throws `NotRegisteredException`.
260
+ Removes a servant from the object adapter's Active Servant Map.
239
261
 
240
262
  Parameters
241
263
  ----------
242
264
  id : Identity
243
- The identity of the Ice object that is implemented by the servant. If the servant implements multiple Ice
244
- objects, `remove` has to be called for all those Ice objects.
265
+ The identity of the Ice object that is implemented by the servant.
245
266
 
246
267
  Returns
247
268
  -------
248
269
  Object
249
270
  The removed servant.
271
+
272
+ Raises
273
+ ------
274
+ NotRegisteredException
275
+ If no servant with the given identity is registered.
250
276
  """
251
277
  return self._impl.remove(id)
252
278
 
253
279
  def removeFacet(self, id: Identity, facet: str) -> Object:
254
280
  """
255
- Remove a servant with a facet from the object adapter's Active Servant Map.
256
-
257
- Calling `remove(id)` is equivalent to calling `removeFacet` with an empty facet.
281
+ Removes a servant from the object adapter's Active Servant Map, while specifying a facet.
258
282
 
259
283
  Parameters
260
284
  ----------
@@ -267,15 +291,18 @@ class ObjectAdapter:
267
291
  -------
268
292
  Object
269
293
  The removed servant.
294
+
295
+ Raises
296
+ ------
297
+ NotRegisteredException
298
+ If no servant with the given identity and facet is registered.
270
299
  """
271
300
  return self._impl.removeFacet(id, facet)
272
301
 
273
302
  def removeAllFacets(self, id: Identity) -> dict[str, Object]:
274
303
  """
275
- Remove all facets with the given identity from the Active Servant Map.
276
-
277
- The operation completely removes the Ice object, including its default facet. Removing an identity that is not
278
- in the map throws `NotRegisteredException`.
304
+ Removes all facets with the given identity from the Active Servant Map. This function completely removes the
305
+ Ice object, including its default facet.
279
306
 
280
307
  Parameters
281
308
  ----------
@@ -286,14 +313,17 @@ class ObjectAdapter:
286
313
  -------
287
314
  dict[str, Object]
288
315
  A collection containing all the facet names and servants of the removed Ice object.
316
+
317
+ Raises
318
+ ------
319
+ NotRegisteredException
320
+ If no servant with the given identity is registered.
289
321
  """
290
322
  return self._impl.removeAllFacets(id)
291
323
 
292
324
  def removeDefaultServant(self, category: str) -> Object:
293
325
  """
294
- Remove the default servant for a specific category.
295
-
296
- Attempting to remove a default servant for a category that is not registered throws `NotRegisteredException`.
326
+ Removes the default servant for a specific category.
297
327
 
298
328
  Parameters
299
329
  ----------
@@ -304,234 +334,224 @@ class ObjectAdapter:
304
334
  -------
305
335
  Object
306
336
  The default servant.
337
+
338
+ Raises
339
+ ------
340
+ NotRegisteredException
341
+ If no default servant is registered for the given category.
307
342
  """
308
343
  return self._impl.removeDefaultServant(category)
309
344
 
310
345
  def find(self, id: Identity) -> Object | None:
311
346
  """
312
- Look up a servant in this object adapter's Active Servant Map by the identity of the Ice object it implements.
347
+ Looks up a servant.
313
348
 
314
- This operation only tries to look up a servant in the Active Servant Map. It does not attempt to find a servant
315
- by using any installed ServantLocator.
349
+ Notes
350
+ -----
351
+ This function only tries to find the servant in the ASM and among the default servants.
352
+ It does not attempt to locate a servant using servant locators.
316
353
 
317
354
  Parameters
318
355
  ----------
319
356
  id : Identity
320
- The identity of the Ice object for which the servant should be returned.
357
+ The identity of an Ice object.
321
358
 
322
359
  Returns
323
360
  -------
324
361
  Object | None
325
- The servant that implements the Ice object with the given identity, or None if no such servant has been found.
362
+ The servant that implements the Ice object with the given identity,
363
+ or ``None`` if no such servant has been found.
326
364
  """
327
365
  return self._impl.find(id)
328
366
 
329
367
  def findFacet(self, id: Identity, facet: str) -> Object | None:
330
368
  """
331
- Look up a servant in this object adapter's Active Servant Map by the identity and facet of the Ice object it implements.
369
+ Looks up a servant with an identity and facet.
332
370
 
333
- Calling `find(id)` is equivalent to calling `findFacet` with an empty facet.
371
+ Notes
372
+ -----
373
+ This function only tries to find the servant in the ASM and among the default servants.
374
+ It does not attempt to locate a servant using servant locators.
334
375
 
335
376
  Parameters
336
377
  ----------
337
378
  id : Identity
338
- The identity of the Ice object for which the servant should be returned.
379
+ The identity of an Ice object.
339
380
  facet : str
340
- The facet. An empty facet means the default facet.
381
+ The facet of an Ice object. An empty facet means the default facet.
341
382
 
342
383
  Returns
343
384
  -------
344
385
  Object | None
345
- The servant that implements the Ice object with the given identity and facet, or None if no such servant has been found.
386
+ The servant that implements the Ice object with the given identity and facet,
387
+ or ``None`` if no such servant has been found.
346
388
  """
347
389
  return self._impl.findFacet(id, facet)
348
390
 
349
391
  def findAllFacets(self, id: Identity) -> dict[str, Object]:
350
392
  """
351
- Find all facets with the given identity in the Active Servant Map.
393
+ Finds all facets for a given identity in the Active Servant Map.
352
394
 
353
395
  Parameters
354
396
  ----------
355
397
  id : Identity
356
- The identity of the Ice object for which the facets should be returned.
398
+ The identity.
357
399
 
358
400
  Returns
359
401
  -------
360
402
  dict[str, Object]
361
- A dictionary containing all the facet names and servants that have been found, or an empty dictionary if
362
- there is no facet for the given identity.
403
+ A collection containing all the facet names and servants that have been found. Can be empty.
363
404
  """
364
405
  return self._impl.findAllFacets(id)
365
406
 
366
407
  def findByProxy(self, proxy: ObjectPrx) -> Object | None:
367
408
  """
368
- Look up a servant in this object adapter's Active Servant Map, given a proxy.
409
+ Looks up a servant with an identity and a facet. It's equivalent to calling :func:`findFacet`.
369
410
 
370
- This operation only tries to look up a servant in the Active Servant Map. It does not attempt to find a servant
371
- by using any installed ServantLocator.
411
+ Notes
412
+ -----
413
+ This function only tries to find the servant in the ASM and among the default servants.
414
+ It does not attempt to locate a servant using servant locators.
372
415
 
373
416
  Parameters
374
417
  ----------
375
418
  proxy : ObjectPrx
376
- The proxy for which the servant should be returned.
419
+ The proxy that provides the identity and facet to search.
377
420
 
378
421
  Returns
379
422
  -------
380
423
  Object | None
381
- The servant that matches the proxy, or None if no such servant has been found.
424
+ The servant that matches the identity and facet carried by ``proxy``,
425
+ or ``None`` if no such servant has been found.
382
426
  """
383
427
  return self._impl.findByProxy(proxy)
384
428
 
385
429
  def addServantLocator(self, locator: ServantLocator, category: str) -> None:
386
430
  """
387
- Add a Servant Locator to this object adapter.
388
-
389
- Adding a servant locator for a category for which a servant locator is already registered throws
390
- `AlreadyRegisteredException`. To dispatch operation calls on servants, the object adapter tries to
391
- find a servant for a given Ice object identity and facet in the following order:
392
-
393
- 1. The object adapter tries to find a servant for the identity and facet in the Active Servant Map.
394
- 2. If no servant has been found in the Active Servant Map, the object adapter tries to find a servant locator
395
- for the category component of the identity. If a locator is found, the object adapter tries to find a servant
396
- using this locator.
397
- 3. If no servant has been found by any of the preceding steps, the object adapter tries to find a locator for
398
- an empty category, regardless of the category contained in the identity. If a locator is found, the object
399
- adapter tries to find a servant using this locator.
400
- 4. If no servant has been found by any of the preceding steps, the object adapter gives up and the caller
401
- receives `ObjectNotExistException` or `FacetNotExistException`.
402
-
403
- Only one locator for the empty category can be installed.
431
+ Adds a ServantLocator to this object adapter for a specific category.
404
432
 
405
433
  Parameters
406
434
  ----------
407
435
  locator : ServantLocator
408
- The locator to add.
436
+ The servant locator to add.
409
437
  category : str
410
- The category for which the Servant Locator can locate servants, or an empty string if the Servant Locator
411
- does not belong to any specific category.
438
+ The category. The empty category means the locator handles all categories.
439
+
440
+ Raises
441
+ ------
442
+ AlreadyRegisteredException
443
+ If a servant locator with the same category is already registered.
412
444
  """
413
445
  self._impl.addServantLocator(locator, category)
414
446
 
415
447
  def removeServantLocator(self, category: str) -> ServantLocator:
416
448
  """
417
- Remove a Servant Locator from this object adapter.
449
+ Removes a ServantLocator from this object adapter.
418
450
 
419
451
  Parameters
420
452
  ----------
421
453
  category : str
422
- The category for which the Servant Locator can locate servants, or an empty string if the Servant Locator
423
- does not belong to any specific category.
454
+ The category.
424
455
 
425
456
  Returns
426
457
  -------
427
458
  ServantLocator
428
- The Servant Locator.
459
+ The servant locator.
429
460
 
430
461
  Raises
431
462
  ------
432
463
  NotRegisteredException
433
- If no Servant Locator was found for the given category.
464
+ If no servant locator with the given category is registered.
434
465
  """
435
466
  return self._impl.removeServantLocator(category)
436
467
 
437
468
  def findServantLocator(self, category: str) -> ServantLocator | None:
438
469
  """
439
- Find a Servant Locator installed with this object adapter.
470
+ Finds a ServantLocator registered with this object adapter.
440
471
 
441
472
  Parameters
442
473
  ----------
443
474
  category : str
444
- The category for which the Servant Locator can locate servants, or an empty string if the Servant Locator
445
- does not belong to any specific category.
475
+ The category.
446
476
 
447
477
  Returns
448
478
  -------
449
479
  ServantLocator | None
450
- The Servant Locator, or None if no Servant Locator was found for the given category.
480
+ The servant locator, or ``None`` if not found.
451
481
  """
452
482
  return self._impl.findServantLocator(category)
453
483
 
454
484
  def findDefaultServant(self, category: str) -> Object | None:
455
485
  """
456
- Find the default servant for a specific category.
486
+ Finds the default servant for a specific category.
457
487
 
458
488
  Parameters
459
489
  ----------
460
490
  category : str
461
- The category of the default servant to find.
491
+ The category.
462
492
 
463
493
  Returns
464
494
  -------
465
- Object or None
466
- The default servant, or None if no default servant was registered for the category.
495
+ Object | None
496
+ The default servant, or ``None`` if not found.
467
497
  """
468
498
  return self._impl.findDefaultServant(category)
469
499
 
470
500
  def createProxy(self, id: Identity) -> ObjectPrx:
471
501
  """
472
- Create a proxy for the object with the given identity.
473
-
474
- If this object adapter is configured with an adapter ID, the return value is an indirect proxy that refers to the
475
- adapter ID. If a replica group ID is also defined, the return value is an indirect proxy that refers to the replica
476
- group ID. Otherwise, if no adapter ID is defined, the return value is a direct proxy containing this object adapter's
477
- published endpoints.
502
+ Creates a proxy from an Ice identity. If this object adapter is configured with an adapter ID, the proxy
503
+ is an indirect proxy that refers to this adapter ID. If a replica group ID is also defined, the proxy is an
504
+ indirect proxy that refers to this replica group ID. Otherwise, the proxy is a direct proxy containing this
505
+ object adapter's published endpoints.
478
506
 
479
507
  Parameters
480
508
  ----------
481
509
  id : Identity
482
- The object's identity.
510
+ An Ice identity.
483
511
 
484
512
  Returns
485
513
  -------
486
514
  ObjectPrx
487
- A proxy for the object with the given identity.
515
+ A proxy with the given identity.
488
516
  """
489
517
  return self._impl.createProxy(id)
490
518
 
491
519
  def createDirectProxy(self, id: Identity) -> ObjectPrx:
492
520
  """
493
- Create a direct proxy for the object with the given identity.
494
-
495
- The returned proxy contains this object adapter's published endpoints.
521
+ Creates a direct proxy from an Ice identity.
496
522
 
497
523
  Parameters
498
524
  ----------
499
525
  id : Identity
500
- The object's identity.
526
+ An Ice identity.
501
527
 
502
528
  Returns
503
529
  -------
504
530
  ObjectPrx
505
- A proxy for the object with the given identity.
531
+ A proxy with the given identity and the published endpoints of this object adapter.
506
532
  """
507
533
  return self._impl.createDirectProxy(id)
508
534
 
509
535
  def createIndirectProxy(self, id: Identity) -> ObjectPrx:
510
536
  """
511
- Create an indirect proxy for the object with the given identity.
512
-
513
- If this object adapter is configured with an adapter ID, the return value refers to the adapter ID. Otherwise,
514
- the return value contains only the object identity.
537
+ Creates an indirect proxy for an Ice identity.
515
538
 
516
539
  Parameters
517
540
  ----------
518
541
  id : Identity
519
- The object's identity.
542
+ An Ice identity.
520
543
 
521
544
  Returns
522
545
  -------
523
546
  ObjectPrx
524
- A proxy for the object with the given identity.
547
+ An indirect proxy with the given identity. If this object adapter is not configured with an adapter
548
+ ID or a replica group ID, the new proxy is a well-known proxy (i.e., an identity-only proxy).
525
549
  """
526
550
  return self._impl.createIndirectProxy(id)
527
551
 
528
552
  def setLocator(self, locator: LocatorPrx) -> None:
529
553
  """
530
- Set an Ice locator for this object adapter.
531
-
532
- By doing so, the object adapter will register itself with the locator registry when it is activated for the first
533
- time. Furthermore, the proxies created by this object adapter will contain the adapter identifier instead of its
534
- endpoints. The adapter identifier must be configured using the AdapterId property.
554
+ Sets an Ice locator on this object adapter.
535
555
 
536
556
  Parameters
537
557
  ----------
@@ -542,45 +562,58 @@ class ObjectAdapter:
542
562
 
543
563
  def getLocator(self) -> LocatorPrx | None:
544
564
  """
545
- Get the Ice locator used by this object adapter.
565
+ Gets the Ice locator used by this object adapter.
546
566
 
547
567
  Returns
548
568
  -------
549
569
  LocatorPrx | None
550
- The locator used by this object adapter, or None if no locator is used by this object adapter.
570
+ The locator used by this object adapter, or ``None`` if no locator is used by this object adapter.
551
571
  """
552
572
  return self._impl.getLocator()
553
573
 
554
- def getEndpoints(self) -> tuple[IcePy.Endpoint, ...]:
574
+ def getEndpoints(self) -> tuple[Endpoint, ...]:
555
575
  """
556
- Get the set of endpoints configured with this object adapter.
576
+ Gets the set of endpoints configured on this object adapter.
577
+
578
+ Notes
579
+ -----
580
+ This function remains usable after the object adapter has been deactivated.
557
581
 
558
582
  Returns
559
583
  -------
560
- tuple[IcePy.Endpoint, ...]
584
+ tuple[Ice.Endpoint, ...]
561
585
  The set of endpoints.
562
586
  """
563
587
  return self._impl.getEndpoints()
564
588
 
565
- def getPublishedEndpoints(self) -> tuple[IcePy.Endpoint, ...]:
589
+ def getPublishedEndpoints(self) -> tuple[Endpoint, ...]:
566
590
  """
567
- Get the set of endpoints that proxies created by this object adapter will contain.
591
+ Gets the set of endpoints that proxies created by this object adapter will contain.
592
+
593
+ Notes
594
+ -----
595
+ This function remains usable after the object adapter has been deactivated.
568
596
 
569
597
  Returns
570
598
  -------
571
- tuple[IcePy.Endpoint, ...]
599
+ tuple[Ice.Endpoint, ...]
572
600
  The set of published endpoints.
573
601
  """
574
602
  return self._impl.getPublishedEndpoints()
575
603
 
576
- def setPublishedEndpoints(self, newEndpoints: tuple[IcePy.Endpoint, ...] | list[IcePy.Endpoint]) -> None:
604
+ def setPublishedEndpoints(self, newEndpoints: tuple[Endpoint, ...] | list[Endpoint]) -> None:
577
605
  """
578
- Set the endpoints that proxies created by this object adapter will contain.
606
+ Sets the endpoints that proxies created by this object adapter will contain.
579
607
 
580
608
  Parameters
581
609
  ----------
582
- newEndpoints : tuple[IcePy.Endpoint, ...] | list[IcePy.Endpoint]
610
+ newEndpoints : tuple[Ice.Endpoint, ...] | list[Ice.Endpoint]
583
611
  The new set of endpoints that the object adapter will embed in proxies.
612
+
613
+ Raises
614
+ ------
615
+ RuntimeError
616
+ If ``newEndpoints`` is empty or if this adapter is associated with a router.
584
617
  """
585
618
  self._impl.setPublishedEndpoints(newEndpoints)
586
619