/usr/share/ice/slice/Ice/Communicator.ice is in zeroc-ice-slice 3.7.0-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | // **********************************************************************
//
// Copyright (c) 2003-2017 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.
//
// **********************************************************************
#pragma once
[["ice-prefix", "cpp:header-ext:h", "cpp:dll-export:ICE_API", "objc:header-dir:objc", "objc:dll-export:ICE_API", "python:pkgdir:Ice"]]
#include <Ice/LoggerF.ice>
#include <Ice/InstrumentationF.ice>
#include <Ice/ObjectAdapterF.ice>
#include <Ice/ObjectFactory.ice>
#include <Ice/ValueFactory.ice>
#include <Ice/Router.ice>
#include <Ice/Locator.ice>
#include <Ice/PluginF.ice>
#include <Ice/ImplicitContextF.ice>
#include <Ice/Current.ice>
#include <Ice/Properties.ice>
#include <Ice/FacetMap.ice>
#include <Ice/Connection.ice>
/**
*
* The Ice core library. Among many other features, the Ice core
* library manages all the communication tasks using an efficient
* protocol (including protocol compression and support for both TCP
* and UDP), provides a thread pool for multi-threaded servers, and
* additional functionality that supports high scalability.
*
**/
#ifndef __SLICE2JAVA_COMPAT__
[["java:package:com.zeroc"]]
#endif
["objc:prefix:ICE"]
module Ice
{
/**
*
* The central object in Ice. One or more communicators can be
* instantiated for an Ice application. Communicator instantiation
* is language-specific, and not specified in Slice code.
*
* @see Logger
* @see ObjectAdapter
* @see Properties
* @see ObjectFactory
* @see ValueFactory
*
**/
["clr:implements:_System.IDisposable", "java:implements:java.lang.AutoCloseable", "php:internal"]
local interface Communicator
{
#ifdef __SLICE2JAVA__
/**
*
* Destroy the communicator. This Java-only method overrides close in
* java.lang.AutoCloseable and does not throw any exception.
*
* @see #destroy
*
**/
void close();
#endif
/**
*
* Destroy the communicator. This operation calls {@link #shutdown}
* implicitly. Calling {@link #destroy} cleans up memory, and shuts down
* this communicator's client functionality and destroys all object
* adapters. Subsequent calls to {@link #destroy} are ignored.
*
* @see #shutdown
* @see ObjectAdapter#destroy
*
**/
["cpp:noexcept"] void destroy();
/**
*
* <p>Shuts down this communicator's server functionality, which
* includes the deactivation of all object adapters. (Attempts to use
* a deactivated object adapter raise {@link ObjectAdapterDeactivatedException}.)
* Subsequent calls to {@link #shutdown} are ignored.</p>
*
* <p class="Note"> After {@link #shutdown} returns, no new requests are
* processed. However, requests that have been started before
* {@link #shutdown} was called might still be active. You can use
* {@link #waitForShutdown} to wait for the completion of all
* requests.
*
* @see #destroy
* @see #waitForShutdown
* @see ObjectAdapter#deactivate
*
**/
void shutdown();
/**
*
* Wait until the application has called {@link #shutdown} (or {@link #destroy}).
* On the server side, this operation blocks the calling thread
* until all currently-executing operations have completed.
* On the client side, the operation simply block until another
* thread has called {@link #shutdown} or {@link #destroy}.
*
* <p>A typical use of this operation is to call it
* from the main thread, which then waits until some other thread
* calls {@link #shutdown}. After shut-down is complete, the main thread
* returns and can do some cleanup work before it finally calls
* {@link #destroy} to shut down the client functionality, and then
* exits the application.
*
* @see #shutdown
* @see #destroy
* @see ObjectAdapter#waitForDeactivate
*
**/
void waitForShutdown();
/**
*
* Check whether communicator has been shut down.
*
* @return True if the communicator has been shut down; false otherwise.
*
* @see #shutdown
*
**/
["cpp:const"] bool isShutdown();
/**
*
* Convert a stringified proxy into a proxy. For example,
* <tt>MyCategory/MyObject:tcp -h some_host -p
* 10000</tt> creates a proxy that refers to the Ice object
* having an identity with a name "MyObject" and a category
* "MyCategory", with the server running on host "some_host", port
* 10000. If the stringified proxy does not parse correctly, the
* operation throws one of {@link ProxyParseException},
* {@link EndpointParseException}, or {@link IdentityParseException}.
* An appendix in the Ice manual provides a detailed description
* of the syntax supported by stringified proxies.
*
* @param str The stringified proxy to convert into a proxy.
*
* @return The proxy, or nil if <tt>str</tt> is an empty string.
*
* @see #proxyToString
*
**/
["cpp:const"] Object* stringToProxy(string str);
/**
*
* Convert a proxy into a string.
*
* @param obj The proxy to convert into a stringified proxy.
*
* @return The stringified proxy, or an empty string if
* <tt>obj</tt> is nil.
*
* @see #stringToProxy
*
**/
["cpp:const"] string proxyToString(Object* obj);
/**
*
* Convert a set of proxy properties into a proxy. The "base"
* name supplied in the <tt>property</tt> argument refers to a
* property containing a stringified proxy, such as
* <tt>MyProxy=id:tcp -h localhost -p 10000</tt>. Additional
* properties configure local settings for the proxy, such as
* <tt>MyProxy.PreferSecure=1</tt>. The "Properties"
* appendix in the Ice manual describes each of the supported
* proxy properties.
*
* @param property The base property name.
*
* @return The proxy.
*
**/
["cpp:const"] Object* propertyToProxy(string property);
/**
*
* Convert a proxy to a set of proxy properties.
*
* @param proxy The proxy.
*
* @param property The base property name.
*
* @return The property set.
*
**/
["cpp:const"] PropertyDict proxyToProperty(Object* proxy, string property);
/**
*
* Convert a string into an identity. If the string does not parse
* correctly, the operation throws {@link IdentityParseException}.
*
* @param str The string to convert into an identity.
*
* @return The identity.
*
* @see #identityToString
*
**/
["cpp:const", "deprecate:stringToIdentity() is deprecated, use the static stringToIdentity() method instead."]
Identity stringToIdentity(string str);
/**
*
* Convert an identity into a string.
*
* @param ident The identity to convert into a string.
*
* @return The "stringified" identity.
*
* @see #stringToIdentity
*
**/
["cpp:const"]
string identityToString(Identity ident);
/**
*
* <p>Create a new object adapter. The endpoints for the object
* adapter are taken from the property <tt><em>name</em>.Endpoints</tt>.</p>
*
* <p>It is legal to create an object adapter with the empty string as
* its name. Such an object adapter is accessible via bidirectional
* connections or by collocated invocations that originate from the
* same communicator as is used by the adapter.</p>
*
* <p>Attempts to create a named object adapter for which no configuration
* can be found raise {@link InitializationException}.
*
* @param name The object adapter name.
*
* @return The new object adapter.
*
* @see #createObjectAdapterWithEndpoints
* @see ObjectAdapter
* @see Properties
*
**/
ObjectAdapter createObjectAdapter(string name);
/**
*
* <p>Create a new object adapter with endpoints. This operation sets
* the property <tt><em>name</em>.Endpoints</tt>,
* and then calls {@link #createObjectAdapter}. It is provided as a
* convenience function.</p>
*
* <p>Calling this operation with an empty name will result in a
* UUID being generated for the name.
*
* @param name The object adapter name.
*
* @param endpoints The endpoints for the object adapter.
*
* @return The new object adapter.
*
* @see #createObjectAdapter
* @see ObjectAdapter
* @see Properties
*
**/
ObjectAdapter createObjectAdapterWithEndpoints(string name, string endpoints);
/**
*
* <p>Create a new object adapter with a router. This operation
* creates a routed object adapter.</p>
*
* <p>Calling this operation with an empty name will result in a
* UUID being generated for the name.
*
* @param name The object adapter name.
*
* @param rtr The router.
*
* @return The new object adapter.
*
* @see #createObjectAdapter
* @see ObjectAdapter
* @see Properties
*
**/
ObjectAdapter createObjectAdapterWithRouter(string name, ["objc:param:router"] Router* rtr);
/**
*
* <p>Add an object factory to this communicator. Installing a
* factory with an id for which a factory is already registered
* throws {@link AlreadyRegisteredException}.</p>
*
* <p>When unmarshaling an Ice object, the Ice run time reads the
* most-derived type id off the wire and attempts to create an
* instance of the type using a factory. If no instance is created,
* either because no factory was found, or because all factories
* returned nil, the behavior of the Ice run time depends on the
* format with which the object was marshaled:</p>
*
* <p>If the object uses the "sliced" format, Ice ascends the class
* hierarchy until it finds a type that is recognized by a factory,
* or it reaches the least-derived type. If no factory is found that
* can create an instance, the run time throws
* {@link NoValueFactoryException}.</p>
*
* <p>If the object uses the "compact" format, Ice immediately raises
* {@link NoValueFactoryException}.</p>
*
* <p>The following order is used to locate a factory for a type:</p>
*
* <ol>
*
* <li>The Ice run-time looks for a factory registered
* specifically for the type.</li>
*
* <li>If no instance has been created, the Ice run-time looks
* for the default factory, which is registered with an empty type id.
* </li>
*
* <li>If no instance has been created by any of the preceding
* steps, the Ice run-time looks for a factory that may have been
* statically generated by the language mapping for non-abstract classes.
* </li>
*
* </ol>
*
* @param factory The factory to add.
*
* @param id The type id for which the factory can create instances, or
* an empty string for the default factory.
*
* @see #findObjectFactory
* @see ObjectFactory
* @see ValueFactoryManager#add
*
**/
["deprecate:addObjectFactory() is deprecated, use ValueFactoryManager::add() instead."]
void addObjectFactory(ObjectFactory factory, ["objc:param:sliceId"] string id);
/**
*
* Find an object factory registered with this communicator.
*
* @param id The type id for which the factory can create instances,
* or an empty string for the default factory.
*
* @return The object factory, or null if no object factory was
* found for the given id.
*
* @see #addObjectFactory
* @see ObjectFactory
* @see ValueFactoryManager#find
*
**/
["cpp:const", "deprecate:findObjectFactory() is deprecated, use ValueFactoryManager::find() instead."]
ObjectFactory findObjectFactory(string id);
/**
* Get the implicit context associated with this communicator.
*
* @return The implicit context associated with this communicator;
* returns null when the property Ice.ImplicitContext is not set
* or is set to None.
*
**/
["cpp:const"] ImplicitContext getImplicitContext();
/**
*
* Get the properties for this communicator.
*
* @return This communicator's properties.
*
* @see Properties
*
**/
["cpp:const"] Properties getProperties();
/**
*
* Get the logger for this communicator.
*
* @return This communicator's logger.
*
* @see Logger
*
**/
["cpp:const"] Logger getLogger();
/**
*
* Get the observer resolver object for this communicator.
*
* @return This communicator's observer resolver object.
*
**/
["cpp:const"] Ice::Instrumentation::CommunicatorObserver getObserver();
/**
*
* Get the default router this communicator.
*
* @return The default router for this communicator.
*
* @see #setDefaultRouter
* @see Router
*
**/
["cpp:const"] Router* getDefaultRouter();
/**
*
* <p>Set a default router for this communicator. All newly
* created proxies will use this default router. To disable the
* default router, null can be used. Note that this
* operation has no effect on existing proxies.</p>
*
* <p class="Note">You can also set a router for an individual proxy
* by calling the operation <tt>ice_router</tt> on the proxy.
*
* @param rtr The default router to use for this communicator.
*
* @see #getDefaultRouter
* @see #createObjectAdapterWithRouter
* @see Router
*
**/
void setDefaultRouter(Router* rtr);
/**
*
* Get the default locator this communicator.
*
* @return The default locator for this communicator.
*
* @see #setDefaultLocator
* @see Locator
*
**/
["cpp:const"] Locator* getDefaultLocator();
/**
*
* <p>Set a default Ice locator for this communicator. All newly
* created proxy and object adapters will use this default
* locator. To disable the default locator, null can be used.
* Note that this operation has no effect on existing proxies or
* object adapters.</p>
*
* <p class="Note"> You can also set a locator for an individual proxy
* by calling the operation <tt>ice_locator</tt> on the proxy, or for an
* object adapter by calling the operation {@link ObjectAdapter#setLocator}
* on the object adapter.
*
* @param loc The default locator to use for this communicator.
*
* @see #getDefaultLocator
* @see Locator
* @see ObjectAdapter#setLocator
*
**/
void setDefaultLocator(Locator* loc);
/**
*
* Get the plug-in manager for this communicator.
*
* @return This communicator's plug-in manager.
*
* @see PluginManager
*
**/
["cpp:const"] PluginManager getPluginManager();
/**
*
* Get the value factory manager for this communicator.
*
* @return This communicator's value factory manager.
*
* @see ValueFactoryManager
*
**/
["cpp:const"] ValueFactoryManager getValueFactoryManager();
/**
*
* Flush any pending batch requests for this communicator.
* This means all batch requests invoked on fixed proxies
* for all connections associated with the communicator.
* Any errors that occur while flushing a connection are ignored.
*
* @param compress Specifies whether or not the queued batch requests
* should be compressed before being sent over the wire.
*
**/
["async-oneway"] void flushBatchRequests(CompressBatch compress);
/**
*
* Add the Admin object with all its facets to the provided object adapter.
* If Ice.Admin.ServerId is set and the provided object adapter has a {@link Locator},
* createAdmin registers the Admin's Process facet with the {@link Locator}'s {@link LocatorRegistry}.
*
* <p>createAdmin call only be called once; subsequent calls raise {@link InitializationException}.</p>
*
* @param adminAdapter The object adapter used to host the Admin object; if null and
* Ice.Admin.Endpoints is set, create, activate and use the Ice.Admin object adapter.
*
* @param adminId The identity of the Admin object.
*
* @return A proxy to the main ("") facet of the Admin object. Never returns a null proxy.
*
* @see #getAdmin
*
**/
Object* createAdmin(ObjectAdapter adminAdapter, Identity adminId);
/**
*
* Get a proxy to the main facet of the Admin object.
*
* getAdmin also creates the Admin object and creates and activates the Ice.Admin object
* adapter to host this Admin object if Ice.Admin.Enpoints is set. The identity of the Admin
* object created by getAdmin is {value of Ice.Admin.InstanceName}/admin, or {UUID}/admin
* when Ice.Admin.InstanceName is not set.
*
* <p>If Ice.Admin.DelayCreation is 0 or not set, getAdmin is called by the communicator
* initialization, after initialization of all plugins.</p>
* @return A proxy to the main ("") facet of the Admin object, or a null proxy if no
* Admin object is configured.
*
* @see #createAdmin
**/
["cpp:const"] Object* getAdmin();
/**
*
* Add a new facet to the Admin object.
* Adding a servant with a facet that is already registered
* throws {@link AlreadyRegisteredException}.
*
* @param servant The servant that implements the new Admin facet.
* @param facet The name of the new Admin facet.
*
**/
void addAdminFacet(Object servant, string facet);
/**
*
* Remove the following facet to the Admin object.
* Removing a facet that was not previously registered throws
* {@link NotRegisteredException}.
*
* @param facet The name of the Admin facet.
* @return The servant associated with this Admin facet.
*
**/
Object removeAdminFacet(string facet);
/**
*
* Returns a facet of the Admin object.
*
* @param facet The name of the Admin facet.
* @return The servant associated with this Admin facet, or
* null if no facet is registered with the given name.
*
**/
Object findAdminFacet(string facet);
/**
*
* Returns a map of all facets of the Admin object.
*
* @return A collection containing all the facet names and
* servants of the Admin object.
*
* @see #findAdminFacet
*
**/
FacetMap findAllAdminFacets();
}
/**
* The output mode for xxxToString method such as identityToString and proxyToString.
* The actual encoding format for the string is the same for all modes: you
* don't need to specify an encoding format or mode when reading such a string.
*
**/
local enum ToStringMode
{
/**
* Characters with ordinal values greater than 127 are kept as-is in the resulting string.
* Non-printable ASCII characters with ordinal values 127 and below are encoded as \\t, \\n (etc.)
* or \\unnnn.
**/
Unicode,
/**
* Characters with ordinal values greater than 127 are encoded as universal character names in
* the resulting string: \\unnnn for BMP characters and \\Unnnnnnnn for non-BMP characters.
* Non-printable ASCII characters with ordinal values 127 and below are encoded as \\t, \\n (etc.)
* or \\unnnn.
**/
ASCII,
/**
* Characters with ordinal values greater than 127 are encoded as a sequence of UTF-8 bytes using
* octal escapes. Characters with ordinal values 127 and below are encoded as \\t, \\n (etc.) or
* an octal escape. Use this mode to generate strings compatible with Ice 3.6 and earlier.
**/
Compat
}
}
|