16#ifndef __Ice_Communicator_h__
17#define __Ice_Communicator_h__
52#ifndef ICE_IGNORE_VERSION
53# if ICE_INT_VERSION / 100 != 307
54# error Ice version mismatch!
56# if ICE_INT_VERSION % 100 >= 50
57# error Beta header file detected
59# if ICE_INT_VERSION % 100 < 11
60# error Ice patch level mismatch!
65# if defined(ICE_STATIC_LIBS)
67# elif defined(ICE_API_EXPORTS)
68# define ICE_API ICE_DECLSPEC_EXPORT
70# define ICE_API ICE_DECLSPEC_IMPORT
74#ifdef ICE_CPP11_MAPPING
479 virtual ::std::function<void()>
481 ::std::function<
void(::std::exception_ptr)> exception,
482 ::std::function<
void(
bool)> sent =
nullptr) = 0;
493 template<
template<
typename>
class P = ::std::promise>
495 ->
decltype(::std::declval<P<void>>().get_future())
497 using Promise = P<void>;
498 auto promise = ::std::make_shared<Promise>();
500 [promise](::std::exception_ptr ex)
502 promise->set_exception(::std::move(ex));
506 promise->set_value();
508 return promise->get_future();
523 virtual ::std::shared_ptr<::Ice::ObjectPrx>
createAdmin(const ::std::shared_ptr<ObjectAdapter>& adminAdapter,
const Identity& adminId) = 0;
539 virtual ::std::shared_ptr<::Ice::ObjectPrx>
getAdmin()
const = 0;
548 virtual void addAdminFacet(const ::std::shared_ptr<Object>& servant, const ::std::string& facet) = 0;
565 virtual ::std::shared_ptr<::Ice::Object>
findAdminFacet(const ::std::string& facet) = 0;
589using CommunicatorPtr = ::std::shared_ptr<Communicator>;
608typedef ::IceInternal::Handle< Communicator> CommunicatorPtr;
660class Callback_Communicator_flushBatchRequests_Base :
public virtual ::IceInternal::CallbackBase { };
661typedef ::IceUtil::Handle< Callback_Communicator_flushBatchRequests_Base> Callback_Communicator_flushBatchRequestsPtr;
687 typedef CommunicatorPtr PointerType;
689 virtual ~Communicator();
691#ifdef ICE_CPP11_COMPILER
692 Communicator() =
default;
693 Communicator(
const Communicator&) =
default;
694 Communicator& operator=(
const Communicator&) =
default;
762 virtual ObjectPrx stringToProxy(const ::std::
string& str) const = 0;
771 virtual ::std::
string proxyToString(const ObjectPrx& obj) const = 0;
785 virtual ObjectPrx propertyToProxy(const ::std::
string& property) const = 0;
793 virtual PropertyDict proxyToProperty(const ObjectPrx& proxy, const ::std::
string& property) const = 0;
804 ICE_DEPRECATED_API(
"stringToIdentity() is deprecated, use the static stringToIdentity() method instead.") virtual Identity stringToIdentity(const ::std::
string& str) const = 0;
812 virtual ::std::
string identityToString(const Identity& ident) const = 0;
831 virtual ObjectAdapterPtr createObjectAdapter(const ::std::
string& name) = 0;
848 virtual ObjectAdapterPtr createObjectAdapterWithEndpoints(const ::std::
string& name, const ::std::
string& endpoints) = 0;
863 virtual ObjectAdapterPtr createObjectAdapterWithRouter(const ::std::
string& name, const RouterPrx& rtr) = 0;
911 ICE_DEPRECATED_API(
"addObjectFactory() is deprecated, use ValueFactoryManager::add() instead.") virtual
void addObjectFactory(const ObjectFactoryPtr& factory, const ::std::
string&
id) = 0;
925 ICE_DEPRECATED_API(
"findObjectFactory() is deprecated, use ValueFactoryManager::find() instead.") virtual ObjectFactoryPtr findObjectFactory(const ::std::
string&
id) const
ICE_NOEXCEPT = 0;
933 virtual ImplicitContextPtr getImplicitContext() const
ICE_NOEXCEPT = 0;
940 virtual PropertiesPtr getProperties() const
ICE_NOEXCEPT = 0;
953 virtual ::Ice::Instrumentation::CommunicatorObserverPtr getObserver() const
ICE_NOEXCEPT = 0;
961 virtual RouterPrx getDefaultRouter() const = 0;
976 virtual
void setDefaultRouter(const RouterPrx& rtr) = 0;
984 virtual LocatorPrx getDefaultLocator() const = 0;
1001 virtual
void setDefaultLocator(const LocatorPrx& loc) = 0;
1008 virtual PluginManagerPtr getPluginManager() const = 0;
1015 virtual ValueFactoryManagerPtr getValueFactoryManager() const
ICE_NOEXCEPT = 0;
1025 virtual
void flushBatchRequests(CompressBatch compress) = 0;
1036 virtual AsyncResultPtr begin_flushBatchRequests(CompressBatch compress) = 0;
1049 virtual AsyncResultPtr begin_flushBatchRequests(CompressBatch compress, const CallbackPtr& cb, const LocalObjectPtr& cookie = 0) = 0;
1062 virtual AsyncResultPtr begin_flushBatchRequests(CompressBatch compress, const Callback_Communicator_flushBatchRequestsPtr& cb, const LocalObjectPtr& cookie = 0) = 0;
1071 virtual
void end_flushBatchRequests(const AsyncResultPtr& result) = 0;
1085 virtual ObjectPrx createAdmin(const ObjectAdapterPtr& adminAdapter, const Identity& adminId) = 0;
1101 virtual ObjectPrx getAdmin() const = 0;
1110 virtual
void addAdminFacet(const ObjectPtr& servant, const ::std::
string& facet) = 0;
1119 virtual ObjectPtr removeAdminFacet(const ::std::
string& facet) = 0;
1127 virtual ObjectPtr findAdminFacet(const ::std::
string& facet) = 0;
1135 virtual FacetMap findAllAdminFacets() = 0;
1139inline
bool operator==(const Communicator& lhs, const Communicator& rhs)
1141 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
1144inline bool operator<(
const Communicator& lhs,
const Communicator& rhs)
1146 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
#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 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