Ice 3.7 C++11 API Reference
Loading...
Searching...
No Matches
Communicator.h
Go to the documentation of this file.
1//
2// Copyright (c) ZeroC, Inc. All rights reserved.
3//
4//
5// Ice version 3.7.11
6//
7// <auto-generated>
8//
9// Generated from file `Communicator.ice'
10//
11// Warning: do not edit this file.
12//
13// </auto-generated>
14//
15
16#ifndef __Ice_Communicator_h__
17#define __Ice_Communicator_h__
18
20#include <Ice/ProxyF.h>
21#include <Ice/ObjectF.h>
22#include <Ice/ValueF.h>
23#include <Ice/Exception.h>
24#include <Ice/LocalObject.h>
25#include <Ice/StreamHelpers.h>
26#include <Ice/Comparable.h>
27#include <Ice/Proxy.h>
28#include <Ice/Object.h>
29#include <Ice/GCObject.h>
30#include <Ice/Value.h>
31#include <Ice/Incoming.h>
32#include <Ice/IncomingAsync.h>
34#include <IceUtil/ScopedArray.h>
35#include <Ice/Optional.h>
37#include <Ice/LoggerF.h>
39#include <Ice/ObjectAdapterF.h>
40#include <Ice/ObjectFactory.h>
41#include <Ice/ValueFactory.h>
42#include <Ice/Router.h>
43#include <Ice/Locator.h>
44#include <Ice/PluginF.h>
46#include <Ice/Current.h>
47#include <Ice/Properties.h>
48#include <Ice/FacetMap.h>
49#include <Ice/Connection.h>
51
52#ifndef ICE_IGNORE_VERSION
53# if ICE_INT_VERSION / 100 != 307
54# error Ice version mismatch!
55# endif
56# if ICE_INT_VERSION % 100 >= 50
57# error Beta header file detected
58# endif
59# if ICE_INT_VERSION % 100 < 11
60# error Ice patch level mismatch!
61# endif
62#endif
63
64#ifndef ICE_API
65# if defined(ICE_STATIC_LIBS)
66# define ICE_API /**/
67# elif defined(ICE_API_EXPORTS)
68# define ICE_API ICE_DECLSPEC_EXPORT
69# else
70# define ICE_API ICE_DECLSPEC_IMPORT
71# endif
72#endif
73
74#ifdef ICE_CPP11_MAPPING // C++11 mapping
75
76namespace Ice
77{
78
79class Communicator;
80
81}
82
83namespace Ice
84{
85
91enum class ToStringMode : unsigned char
92{
112};
113
114}
115
116namespace Ice
117{
118
129class ICE_CLASS(ICE_API) Communicator
130{
131public:
132
134
143 virtual void destroy() noexcept = 0;
144
159 virtual void shutdown() noexcept = 0;
160
177 virtual void waitForShutdown() noexcept = 0;
178
184 virtual bool isShutdown() const noexcept = 0;
185
200 virtual ::std::shared_ptr<::Ice::ObjectPrx> stringToProxy(const ::std::string& str) const = 0;
201
209 virtual ::std::string proxyToString(const ::std::shared_ptr<ObjectPrx>& obj) const = 0;
210
223 virtual ::std::shared_ptr<::Ice::ObjectPrx> propertyToProxy(const ::std::string& property) const = 0;
224
231 virtual ::Ice::PropertyDict proxyToProperty(const ::std::shared_ptr<ObjectPrx>& proxy, const ::std::string& property) const = 0;
232
242 ICE_DEPRECATED_API("stringToIdentity() is deprecated, use the static stringToIdentity() method instead.") virtual ::Ice::Identity stringToIdentity(const ::std::string& str) const = 0;
243
250 virtual ::std::string identityToString(const Identity& ident) const = 0;
251
269 virtual ::std::shared_ptr<::Ice::ObjectAdapter> createObjectAdapter(const ::std::string& name) = 0;
270
286 virtual ::std::shared_ptr<::Ice::ObjectAdapter> createObjectAdapterWithEndpoints(const ::std::string& name, const ::std::string& endpoints) = 0;
287
301 virtual ::std::shared_ptr<::Ice::ObjectAdapter> createObjectAdapterWithRouter(const ::std::string& name, const ::std::shared_ptr<RouterPrx>& rtr) = 0;
302
349 ICE_DEPRECATED_API("addObjectFactory() is deprecated, use ValueFactoryManager::add() instead.") virtual void addObjectFactory(const ::std::shared_ptr<ObjectFactory>& factory, const ::std::string& id) = 0;
350
363 ICE_DEPRECATED_API("findObjectFactory() is deprecated, use ValueFactoryManager::find() instead.") virtual ::std::shared_ptr<::Ice::ObjectFactory> findObjectFactory(const ::std::string& id) const noexcept = 0;
364
371 virtual ::std::shared_ptr<::Ice::ImplicitContext> getImplicitContext() const noexcept = 0;
372
378 virtual ::std::shared_ptr<::Ice::Properties> getProperties() const noexcept = 0;
379
385 virtual ::std::shared_ptr<::Ice::Logger> getLogger() const noexcept = 0;
386
391 virtual ::std::shared_ptr<::Ice::Instrumentation::CommunicatorObserver> getObserver() const noexcept = 0;
392
399 virtual ::std::shared_ptr<::Ice::RouterPrx> getDefaultRouter() const = 0;
400
414 virtual void setDefaultRouter(const ::std::shared_ptr<RouterPrx>& rtr) = 0;
415
422 virtual ::std::shared_ptr<::Ice::LocatorPrx> getDefaultLocator() const = 0;
423
439 virtual void setDefaultLocator(const ::std::shared_ptr<LocatorPrx>& loc) = 0;
440
446 virtual ::std::shared_ptr<::Ice::PluginManager> getPluginManager() const = 0;
447
453 virtual ::std::shared_ptr<::Ice::ValueFactoryManager> getValueFactoryManager() const noexcept = 0;
454
463 virtual void flushBatchRequests(CompressBatch compress)
464 {
465 flushBatchRequestsAsync(compress).get();
466 }
467
479 virtual ::std::function<void()>
481 ::std::function<void(::std::exception_ptr)> exception,
482 ::std::function<void(bool)> sent = nullptr) = 0;
483
493 template<template<typename> class P = ::std::promise>
495 -> decltype(::std::declval<P<void>>().get_future())
496 {
497 using Promise = P<void>;
498 auto promise = ::std::make_shared<Promise>();
500 [promise](::std::exception_ptr ex)
501 {
502 promise->set_exception(::std::move(ex));
503 },
504 [promise](bool)
505 {
506 promise->set_value();
507 });
508 return promise->get_future();
509 }
510
523 virtual ::std::shared_ptr<::Ice::ObjectPrx> createAdmin(const ::std::shared_ptr<ObjectAdapter>& adminAdapter, const Identity& adminId) = 0;
524
539 virtual ::std::shared_ptr<::Ice::ObjectPrx> getAdmin() const = 0;
540
548 virtual void addAdminFacet(const ::std::shared_ptr<Object>& servant, const ::std::string& facet) = 0;
549
557 virtual ::std::shared_ptr<::Ice::Object> removeAdminFacet(const ::std::string& facet) = 0;
558
565 virtual ::std::shared_ptr<::Ice::Object> findAdminFacet(const ::std::string& facet) = 0;
566
573 virtual ::Ice::FacetMap findAllAdminFacets() = 0;
574};
575
576}
577
579namespace Ice
580{
581
582}
584
586namespace Ice
587{
588
589using CommunicatorPtr = ::std::shared_ptr<Communicator>;
590
591}
593
594#else // C++98 mapping
595
596namespace IceProxy
597{
598
599}
600
601namespace Ice
602{
603
604class Communicator;
606ICE_API LocalObject* upCast(Communicator*);
608typedef ::IceInternal::Handle< Communicator> CommunicatorPtr;
609
610}
611
612namespace Ice
613{
614
620enum ToStringMode
621{
627 Unicode,
634 ASCII,
640 Compat
641};
642
643}
644
646namespace IceAsync
647{
648
649}
651
652namespace Ice
653{
654
660class Callback_Communicator_flushBatchRequests_Base : public virtual ::IceInternal::CallbackBase { };
661typedef ::IceUtil::Handle< Callback_Communicator_flushBatchRequests_Base> Callback_Communicator_flushBatchRequestsPtr;
662
663}
664
665namespace IceProxy
666{
667
668}
669
670namespace Ice
671{
672
683class ICE_API Communicator : public virtual LocalObject
684{
685public:
686
687 typedef CommunicatorPtr PointerType;
688
689 virtual ~Communicator();
690
691#ifdef ICE_CPP11_COMPILER
692 Communicator() = default;
693 Communicator(const Communicator&) = default;
694 Communicator& operator=(const Communicator&) = default;
695#endif
696
705 virtual void destroy() ICE_NOEXCEPT = 0;
706
721 virtual void shutdown() ICE_NOEXCEPT = 0;
722
739 virtual void waitForShutdown() ICE_NOEXCEPT = 0;
740
746 virtual bool isShutdown() const ICE_NOEXCEPT = 0;
747
762 virtual ObjectPrx stringToProxy(const ::std::string& str) const = 0;
763
771 virtual ::std::string proxyToString(const ObjectPrx& obj) const = 0;
772
785 virtual ObjectPrx propertyToProxy(const ::std::string& property) const = 0;
786
793 virtual PropertyDict proxyToProperty(const ObjectPrx& proxy, const ::std::string& property) const = 0;
794
804 ICE_DEPRECATED_API("stringToIdentity() is deprecated, use the static stringToIdentity() method instead.") virtual Identity stringToIdentity(const ::std::string& str) const = 0;
805
812 virtual ::std::string identityToString(const Identity& ident) const = 0;
813
831 virtual ObjectAdapterPtr createObjectAdapter(const ::std::string& name) = 0;
832
848 virtual ObjectAdapterPtr createObjectAdapterWithEndpoints(const ::std::string& name, const ::std::string& endpoints) = 0;
849
863 virtual ObjectAdapterPtr createObjectAdapterWithRouter(const ::std::string& name, const RouterPrx& rtr) = 0;
864
911 ICE_DEPRECATED_API("addObjectFactory() is deprecated, use ValueFactoryManager::add() instead.") virtual void addObjectFactory(const ObjectFactoryPtr& factory, const ::std::string& id) = 0;
912
925 ICE_DEPRECATED_API("findObjectFactory() is deprecated, use ValueFactoryManager::find() instead.") virtual ObjectFactoryPtr findObjectFactory(const ::std::string& id) const ICE_NOEXCEPT = 0;
926
933 virtual ImplicitContextPtr getImplicitContext() const ICE_NOEXCEPT = 0;
934
940 virtual PropertiesPtr getProperties() const ICE_NOEXCEPT = 0;
941
947 virtual LoggerPtr getLogger() const ICE_NOEXCEPT = 0;
948
953 virtual ::Ice::Instrumentation::CommunicatorObserverPtr getObserver() const ICE_NOEXCEPT = 0;
954
961 virtual RouterPrx getDefaultRouter() const = 0;
962
976 virtual void setDefaultRouter(const RouterPrx& rtr) = 0;
977
984 virtual LocatorPrx getDefaultLocator() const = 0;
985
1001 virtual void setDefaultLocator(const LocatorPrx& loc) = 0;
1002
1008 virtual PluginManagerPtr getPluginManager() const = 0;
1009
1015 virtual ValueFactoryManagerPtr getValueFactoryManager() const ICE_NOEXCEPT = 0;
1016
1025 virtual void flushBatchRequests(CompressBatch compress) = 0;
1026
1036 virtual AsyncResultPtr begin_flushBatchRequests(CompressBatch compress) = 0;
1037
1049 virtual AsyncResultPtr begin_flushBatchRequests(CompressBatch compress, const CallbackPtr& cb, const LocalObjectPtr& cookie = 0) = 0;
1050
1062 virtual AsyncResultPtr begin_flushBatchRequests(CompressBatch compress, const Callback_Communicator_flushBatchRequestsPtr& cb, const LocalObjectPtr& cookie = 0) = 0;
1063
1071 virtual void end_flushBatchRequests(const AsyncResultPtr& result) = 0;
1072
1085 virtual ObjectPrx createAdmin(const ObjectAdapterPtr& adminAdapter, const Identity& adminId) = 0;
1086
1101 virtual ObjectPrx getAdmin() const = 0;
1102
1110 virtual void addAdminFacet(const ObjectPtr& servant, const ::std::string& facet) = 0;
1111
1119 virtual ObjectPtr removeAdminFacet(const ::std::string& facet) = 0;
1120
1127 virtual ObjectPtr findAdminFacet(const ::std::string& facet) = 0;
1128
1135 virtual FacetMap findAllAdminFacets() = 0;
1136};
1137
1139inline bool operator==(const Communicator& lhs, const Communicator& rhs)
1140{
1141 return static_cast<const LocalObject&>(lhs) == static_cast<const LocalObject&>(rhs);
1142}
1143
1144inline bool operator<(const Communicator& lhs, const Communicator& rhs)
1145{
1146 return static_cast<const LocalObject&>(lhs) < static_cast<const LocalObject&>(rhs);
1147}
1149
1150}
1151
1153namespace Ice
1154{
1155
1156}
1158
1159#endif
1160
1162#endif
#define ICE_DEPRECATED_API(msg)
Definition Config.h:217
#define ICE_API
Definition Config.h:197
#define ICE_NOEXCEPT
Definition Config.h:128
#define ICE_MEMBER(API)
Definition Config.h:177
The central object in Ice.
Definition Communicator.h:130
virtual ::std::shared_ptr<::Ice::PluginManager > getPluginManager() const =0
Get the plug-in manager for this communicator.
virtual ::std::shared_ptr<::Ice::ObjectPrx > createAdmin(const ::std::shared_ptr< ObjectAdapter > &adminAdapter, const Identity &adminId)=0
Add the Admin object with all its facets to the provided object adapter.
virtual ::std::shared_ptr<::Ice::LocatorPrx > getDefaultLocator() const =0
Get the default locator this communicator.
virtual::Ice::Identity stringToIdentity(const ::std::string &str) const =0
Convert a string into an identity.
virtual ::std::shared_ptr<::Ice::ImplicitContext > getImplicitContext() const noexcept=0
Get the implicit context associated with this communicator.
virtual ::std::shared_ptr<::Ice::ValueFactoryManager > getValueFactoryManager() const noexcept=0
Get the value factory manager for this communicator.
virtual void shutdown() noexcept=0
Shuts down this communicator's server functionality, which includes the deactivation of all object ad...
virtual void addObjectFactory(const ::std::shared_ptr< ObjectFactory > &factory, const ::std::string &id)=0
Add an object factory to this communicator.
virtual ::std::function< void()> flushBatchRequestsAsync(CompressBatch compress, ::std::function< void(::std::exception_ptr)> exception, ::std::function< void(bool)> sent=nullptr)=0
Flush any pending batch requests for this communicator.
virtual void flushBatchRequests(CompressBatch compress)
Flush any pending batch requests for this communicator.
Definition Communicator.h:463
virtual ::std::shared_ptr<::Ice::Logger > getLogger() const noexcept=0
Get the logger for this communicator.
virtual void setDefaultLocator(const ::std::shared_ptr< LocatorPrx > &loc)=0
Set a default Ice locator for this communicator.
virtual::std::string identityToString(const Identity &ident) const =0
Convert an identity into a string.
virtual void waitForShutdown() noexcept=0
Wait until the application has called shutdown (or destroy).
virtual void addAdminFacet(const ::std::shared_ptr< Object > &servant, const ::std::string &facet)=0
Add a new facet to the Admin object.
virtual ::std::shared_ptr<::Ice::RouterPrx > getDefaultRouter() const =0
Get the default router this communicator.
virtual bool isShutdown() const noexcept=0
Check whether communicator has been shut down.
virtual ::std::shared_ptr<::Ice::ObjectFactory > findObjectFactory(const ::std::string &id) const noexcept=0
Find an object factory registered with this communicator.
virtual ::std::shared_ptr<::Ice::ObjectAdapter > createObjectAdapter(const ::std::string &name)=0
Create a new object adapter.
virtual ~Communicator()
virtual void setDefaultRouter(const ::std::shared_ptr< RouterPrx > &rtr)=0
Set a default router for this communicator.
virtual ::std::shared_ptr<::Ice::Object > findAdminFacet(const ::std::string &facet)=0
Returns a facet of the Admin object.
virtual ::std::shared_ptr<::Ice::Object > removeAdminFacet(const ::std::string &facet)=0
Remove the following facet to the Admin object.
virtual ::std::shared_ptr<::Ice::ObjectPrx > propertyToProxy(const ::std::string &property) const =0
Convert a set of proxy properties into a proxy.
virtual ::std::shared_ptr<::Ice::ObjectPrx > getAdmin() const =0
Get a proxy to the main facet of the Admin object.
virtual::std::string proxyToString(const ::std::shared_ptr< ObjectPrx > &obj) const =0
Convert a proxy into a string.
virtual void destroy() noexcept=0
Destroy the communicator.
virtual ::std::shared_ptr<::Ice::Instrumentation::CommunicatorObserver > getObserver() const noexcept=0
Get the observer resolver object for this communicator.
virtual ::std::shared_ptr<::Ice::ObjectAdapter > createObjectAdapterWithEndpoints(const ::std::string &name, const ::std::string &endpoints)=0
Create a new object adapter with endpoints.
auto flushBatchRequestsAsync(CompressBatch compress) -> decltype(::std::declval< P< void > >().get_future())
Flush any pending batch requests for this communicator.
Definition Communicator.h:494
virtual::Ice::FacetMap findAllAdminFacets()=0
Returns a map of all facets of the Admin object.
virtual ::std::shared_ptr<::Ice::ObjectPrx > stringToProxy(const ::std::string &str) const =0
Convert a stringified proxy into a proxy.
virtual ::std::shared_ptr<::Ice::Properties > getProperties() const noexcept=0
Get the properties for this communicator.
virtual ::std::shared_ptr<::Ice::ObjectAdapter > createObjectAdapterWithRouter(const ::std::string &name, const ::std::shared_ptr< RouterPrx > &rtr)=0
Create a new object adapter with a router.
virtual::Ice::PropertyDict proxyToProperty(const ::std::shared_ptr< ObjectPrx > &proxy, const ::std::string &property) const =0
Convert a proxy to a set of proxy properties.
An interface to associate implict contexts with communicators.
Definition ImplicitContext.h:93
The Ice locator interface.
Definition Locator.h:517
The Ice message logger.
Definition Logger.h:71
The object adapter provides an up-call interface from the Ice run time to the implementation of Ice o...
Definition ObjectAdapter.h:90
A factory for objects.
Definition ObjectFactory.h:74
Base class of all object proxies.
Definition Proxy.h:317
Each communicator has a plug-in manager to administer the set of plug-ins.
Definition Plugin.h:100
A property set used to configure Ice and Ice applications.
Definition Properties.h:80
The Ice router interface.
Definition Router.h:242
A value factory manager maintains a collection of value factories.
Definition ValueFactory.h:87
Definition Instrumentation.h:63
Definition BuiltinSequences.h:56
CompressBatch
The batch compression option when flushing queued batch requests.
Definition Connection.h:78
::std::map<::std::string, ::std::string > PropertyDict
A simple collection of properties, represented as a dictionary of key/value pairs.
Definition PropertiesAdmin.h:78
IceUtil::Shared * upCast(::Ice::LocalObject *)
ToStringMode
The output mode for xxxToString method such as identityToString and proxyToString.
Definition Communicator.h:92
@ Compat
Characters with ordinal values greater than 127 are encoded as a sequence of UTF-8 bytes using octal ...
Definition Communicator.h:111
@ Unicode
Characters with ordinal values greater than 127 are kept as-is in the resulting string.
Definition Communicator.h:98
@ ASCII
Characters with ordinal values greater than 127 are encoded as universal character names in the resul...
Definition Communicator.h:105
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:136
The identity of an Ice object.
Definition Identity.h:67