Ice 3.7 Slice API Reference
Communicator.ice
Go to the documentation of this file.
1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4 
5 #pragma once
6 
7 [["cpp:dll-export:ICE_API"]]
8 [["cpp:doxygen:include:Ice/Ice.h"]]
9 [["cpp:header-ext:h"]]
10 
11 [["ice-prefix"]]
12 
13 [["js:module:ice"]]
14 [["js:cjs-module"]]
15 
16 [["objc:dll-export:ICE_API"]]
17 [["objc:header-dir:objc"]]
18 
19 [["python:pkgdir:Ice"]]
20 
21 #include <Ice/LoggerF.ice>
22 #include <Ice/InstrumentationF.ice>
23 #include <Ice/ObjectAdapterF.ice>
24 #include <Ice/ObjectFactory.ice>
25 #include <Ice/ValueFactory.ice>
26 #include <Ice/Router.ice>
27 #include <Ice/Locator.ice>
28 #include <Ice/PluginF.ice>
29 #include <Ice/ImplicitContextF.ice>
30 #include <Ice/Current.ice>
31 #include <Ice/Properties.ice>
32 #include <Ice/FacetMap.ice>
33 #include <Ice/Connection.ice>
34 
44 #ifndef __SLICE2JAVA_COMPAT__
45 [["java:package:com.zeroc"]]
46 #endif
47 
48 ["objc:prefix:ICE"]
49 module Ice
50 {
51 
64 ["clr:implements:global::System.IDisposable", "java:implements:java.lang.AutoCloseable"]
65 
66 #if !defined(__SLICE2PHP__) && !defined(__SLICE2MATLAB__)
67 local interface Communicator
68 {
69 
70 #ifdef __SLICE2JAVA__
71 
79  void close();
80 #endif
81 
93  ["cpp:noexcept", "swift:noexcept", "js:async"] void destroy();
94 
112  ["cpp:noexcept", "swift:noexcept", "js:async"] void shutdown();
113 
133  ["cpp:noexcept", "swift:noexcept", "js:async"] void waitForShutdown();
134 
144  ["cpp:const", "cpp:noexcept", "swift:noexcept"] bool isShutdown();
145 
165  ["cpp:const"] Object* stringToProxy(string str);
166 
179  ["cpp:const", "swift:noexcept"] string proxyToString(Object* obj);
180 
197  ["cpp:const"] Object* propertyToProxy(string property);
198 
210  ["cpp:const", "swift:noexcept"] PropertyDict proxyToProperty(["swift:nonnull"] Object* proxy, string property);
211 
212 #ifndef __SLICE2SWIFT__
213 
225  ["cpp:const", "deprecate:stringToIdentity() is deprecated, use the static stringToIdentity() method instead."]
227 #endif
228 
240  ["cpp:const", "swift:noexcept"] string identityToString(Identity ident);
241 
264  ["js:async", "swift:nonnull"] ObjectAdapter createObjectAdapter(string name);
265 
287  ["js:async", "swift:nonnull"] ObjectAdapter createObjectAdapterWithEndpoints(string name, string endpoints);
288 
308  ["js:async", "swift:nonnull"] ObjectAdapter
309  createObjectAdapterWithRouter(string name, ["objc:param:router", "swift:nonnull"] Router* rtr);
310 
311 #if !defined(__SLICE2SWIFT__)
312 
361  ["deprecate:addObjectFactory() is deprecated, use ValueFactoryManager::add() instead."]
362  void addObjectFactory(ObjectFactory factory, ["objc:param:sliceId"] string id);
363 
379  ["cpp:const", "cpp:noexcept", "deprecate:findObjectFactory() is deprecated, use ValueFactoryManager::find() instead."]
381 
382 #endif
383 
392  ["cpp:const", "cpp:noexcept", "swift:noexcept", "swift:nonnull"]
394 
404  ["cpp:const", "cpp:noexcept", "swift:noexcept", "swift:nonnull"] Properties getProperties();
405 
415  ["cpp:const", "cpp:noexcept", "swift:noexcept", "swift:nonnull"] Logger getLogger();
416 
417 #if !defined(__SLICE2SWIFT__) && !defined(__SLICE2JS__)
418 
425  ["cpp:const", "cpp:noexcept"] Instrumentation::CommunicatorObserver getObserver();
426 #endif
427 
438  ["cpp:const", "swift:noexcept"] Router* getDefaultRouter();
439 
457  ["swift:noexcept"] void setDefaultRouter(Router* rtr);
458 
469  ["cpp:const", "swift:noexcept"] Locator* getDefaultLocator();
470 
490  ["swift:noexcept"] void setDefaultLocator(Locator* loc);
491 
492 #if !defined(__SLICE2SWIFT__) && !defined(__SLICE2JS__)
493 
503 #endif
504 
514  ["cpp:const", "cpp:noexcept", "swift:noexcept", "swift:nonnull"]
516 
528  ["async-oneway"] void flushBatchRequests(CompressBatch compress);
529 
530 #ifndef __SLICE2JS__
531 
549  ["swift:nonnull"] Object* createAdmin(ObjectAdapter adminAdapter, Identity adminId);
550 
568  ["cpp:const"] Object* getAdmin();
569 
580  void addAdminFacet(["swift:nonnull"] Object servant, string facet);
581 
592  ["swift:nonnull", "swift:attribute:@discardableResult"] Object removeAdminFacet(string facet);
593 
603  ["swift:noexcept"] Object findAdminFacet(string facet);
604 
615  ["swift:noexcept"] FacetMap findAllAdminFacets();
616 #endif
617 
618 #if defined(__SLICE2SWIFT__) || defined(ICE_SWIFT)
619 
627  ["cpp:const", "swift:nonnull", "cpp:type:dispatch_queue_t", "swift:type:Dispatch.DispatchQueue"]
628  LocalObject getClientDispatchQueue();
629 
638  ["cpp:const", "swift:nonnull", "cpp:type:dispatch_queue_t", "swift:type:Dispatch.DispatchQueue"]
639  LocalObject getServerDispatchQueue();
640 #endif
641 }
642 
643 #endif
644 
651 local enum ToStringMode
652 {
659 
667 
673  Compat
674 }
675 
676 }
Ice::Router
The Ice router interface.
Definition: Router.ice:39
Router.ice
Ice::ObjectAdapter
The object adapter provides an up-call interface from the Ice run time to the implementation of Ice o...
Definition: ObjectAdapter.ice:50
Ice::FacetMap
FacetMap
A mapping from facet name to servant.
Definition: FacetMap.ice:34
ValueFactory.ice
Ice::Communicator::findAdminFacet
Object findAdminFacet(string facet)
Returns a facet of the Admin object.
Ice::Communicator::setDefaultLocator
void setDefaultLocator(Locator *loc)
Set a default Ice locator for this communicator.
Ice::Communicator
The central object in Ice.
Definition: Communicator.ice:68
Ice::Communicator::shutdown
void shutdown()
Shuts down this communicator's server functionality, which includes the deactivation of all object ad...
Ice::Unicode
@ Unicode
Characters with ordinal values greater than 127 are kept as-is in the resulting string.
Definition: Communicator.ice:658
Ice::Communicator::proxyToProperty
PropertyDict proxyToProperty(["swift:nonnull"] Object *proxy, string property)
Convert a proxy to a set of proxy properties.
Ice::Communicator::createObjectAdapterWithEndpoints
ObjectAdapter createObjectAdapterWithEndpoints(string name, string endpoints)
Create a new object adapter with endpoints.
Ice::Communicator::destroy
void destroy()
Destroy the communicator.
Ice::PropertyDict
dictionary< string, string > PropertyDict
A simple collection of properties, represented as a dictionary of key/value pairs.
Definition: PropertiesAdmin.ice:39
Ice::Communicator::propertyToProxy
Object * propertyToProxy(string property)
Convert a set of proxy properties into a proxy.
FacetMap.ice
Ice::Communicator::createAdmin
Object * createAdmin(ObjectAdapter adminAdapter, Identity adminId)
Add the Admin object with all its facets to the provided object adapter.
InstrumentationF.ice
Ice::Communicator::createObjectAdapter
ObjectAdapter createObjectAdapter(string name)
Create a new object adapter.
ImplicitContextF.ice
Ice::CompressBatch
CompressBatch
The batch compression option when flushing queued batch requests.
Definition: Connection.ice:39
Ice::Communicator::getAdmin
Object * getAdmin()
Get a proxy to the main facet of the Admin object.
Ice::Communicator::addObjectFactory
void addObjectFactory(ObjectFactory factory, ["objc:param:sliceId"] string id)
Add an object factory to this communicator.
Ice::Communicator::waitForShutdown
void waitForShutdown()
Wait until the application has called shutdown (or destroy).
Ice::ImplicitContext
An interface to associate implict contexts with communicators.
Definition: ImplicitContext.ice:58
Ice::Communicator::flushBatchRequests
void flushBatchRequests(CompressBatch compress)
Flush any pending batch requests for this communicator.
Ice::Compat
@ Compat
Characters with ordinal values greater than 127 are encoded as a sequence of UTF-8 bytes using octal ...
Definition: Communicator.ice:673
Ice::Communicator::createObjectAdapterWithRouter
ObjectAdapter createObjectAdapterWithRouter(string name, ["objc:param:router", "swift:nonnull"] Router *rtr)
Create a new object adapter with a router.
Ice::Communicator::getImplicitContext
ImplicitContext getImplicitContext()
Get the implicit context associated with this communicator.
LoggerF.ice
ObjectFactory.ice
Ice::Communicator::identityToString
string identityToString(Identity ident)
Convert an identity into a string.
Ice::Instrumentation::CommunicatorObserver
The communicator observer interface used by the Ice run-time to obtain and update observers for its o...
Definition: Instrumentation.ice:385
Locator.ice
Ice::Communicator::getDefaultRouter
Router * getDefaultRouter()
Get the default router this communicator.
Ice::Communicator::stringToIdentity
Identity stringToIdentity(string str)
Convert a string into an identity.
Ice::Communicator::stringToProxy
Object * stringToProxy(string str)
Convert a stringified proxy into a proxy.
Connection.ice
Ice::Communicator::getObserver
Instrumentation::CommunicatorObserver getObserver()
Get the observer resolver object for this communicator.
Ice::Communicator::getPluginManager
PluginManager getPluginManager()
Get the plug-in manager for this communicator.
Ice::Communicator::isShutdown
bool isShutdown()
Check whether communicator has been shut down.
Ice::Communicator::getDefaultLocator
Locator * getDefaultLocator()
Get the default locator this communicator.
Ice::Properties
A property set used to configure Ice and Ice applications.
Definition: Properties.ice:42
Ice::ObjectFactory
A factory for objects.
Definition: ObjectFactory.ice:39
Ice::Communicator::proxyToString
string proxyToString(Object *obj)
Convert a proxy into a string.
Properties.ice
ObjectAdapterF.ice
Ice::Communicator::findAllAdminFacets
FacetMap findAllAdminFacets()
Returns a map of all facets of the Admin object.
Ice::Logger
The Ice message logger.
Definition: Logger.ice:36
Ice
The Ice core library.
Definition: BuiltinSequences.ice:27
Ice::Communicator::addAdminFacet
void addAdminFacet(["swift:nonnull"] Object servant, string facet)
Add a new facet to the Admin object.
Ice::ValueFactoryManager
A value factory manager maintains a collection of value factories.
Definition: ValueFactory.ice:71
Current.ice
Ice::ToStringMode
ToStringMode
The output mode for xxxToString method such as identityToString and proxyToString.
Definition: Communicator.ice:652
Ice::Communicator::setDefaultRouter
void setDefaultRouter(Router *rtr)
Set a default router for this communicator.
Ice::Communicator::getLogger
Logger getLogger()
Get the logger for this communicator.
Ice::Communicator::findObjectFactory
ObjectFactory findObjectFactory(string id)
Find an object factory registered with this communicator.
Ice::Locator
The Ice locator interface.
Definition: Locator.ice:94
Ice::ASCII
@ ASCII
Characters with ordinal values greater than 127 are encoded as universal character names in the resul...
Definition: Communicator.ice:666
Ice::Identity
The identity of an Ice object.
Definition: Identity.ice:40
Ice::Communicator::getValueFactoryManager
ValueFactoryManager getValueFactoryManager()
Get the value factory manager for this communicator.
Ice::Communicator::getProperties
Properties getProperties()
Get the properties for this communicator.
Ice::Communicator::removeAdminFacet
Object removeAdminFacet(string facet)
Remove the following facet to the Admin object.
PluginF.ice
Ice::PluginManager
Each communicator has a plug-in manager to administer the set of plug-ins.
Definition: Plugin.ice:68