7#ifndef IceGrid_Registry_h_
8#define IceGrid_Registry_h_
13#include <Ice/Locator.h>
15#include <IceGrid/Config.h>
17#ifndef ICE_DISABLE_VERSION
18# if ICE_INT_VERSION != 30850
19# error Ice version mismatch: an exact match is required for beta generated code
24# if defined(ICEGRID_API_EXPORTS)
25# define ICEGRID_API ICE_DECLSPEC_EXPORT
27# define ICEGRID_API ICE_DECLSPEC_IMPORT
129 std::function<void()>
findObjectByIdAsync(const ::Ice::Identity&
id, std::function<
void(std::optional<Ice::ObjectPrx>)> response, std::function<
void(std::exception_ptr)> exception =
nullptr, std::function<
void(
bool)> sent =
nullptr,
const Ice::Context& context =
Ice::noExplicitContext)
const;
132 void _iceI_findObjectById(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, const ::Ice::Identity&,
const Ice::Context&)
const;
159 std::function<void()>
findObjectByTypeAsync(std::string_view type, std::function<
void(std::optional<Ice::ObjectPrx>)> response, std::function<
void(std::exception_ptr)> exception =
nullptr, std::function<
void(
bool)> sent =
nullptr,
const Ice::Context& context =
Ice::noExplicitContext)
const;
162 void _iceI_findObjectByType(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, std::string_view,
const Ice::Context&)
const;
198 void _iceI_findObjectByTypeOnLeastLoadedNode(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<Ice::ObjectPrx>>>&, std::string_view,
LoadSample,
const Ice::Context&)
const;
225 void _iceI_findAllObjectsByType(
const std::shared_ptr<IceInternal::OutgoingAsyncT<::Ice::ObjectProxySeq>>&, std::string_view,
const Ice::Context&)
const;
252 void _iceI_findAllReplicas(
const std::shared_ptr<IceInternal::OutgoingAsyncT<::Ice::ObjectProxySeq>>&,
const std::optional<Ice::ObjectPrx>&,
const Ice::Context&)
const;
259 static
QueryPrx _fromReference(IceInternal::ReferencePtr ref) {
return QueryPrx{std::move(ref)}; }
266 explicit QueryPrx(IceInternal::ReferencePtr&& ref) :
Ice::ObjectPrx{std::move(ref)}
290 ~RegistryPrx()
override;
341 std::function<void()>
createSessionAsync(std::string_view userId, std::string_view password, std::function<
void(std::optional<::IceGrid::SessionPrx>)> response, std::function<
void(std::exception_ptr)> exception =
nullptr, std::function<
void(
bool)> sent =
nullptr,
const Ice::Context& context =
Ice::noExplicitContext)
const;
344 void _iceI_createSession(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<SessionPrx>>>&, std::string_view, std::string_view,
const Ice::Context&)
const;
372 std::function<void()>
createAdminSessionAsync(std::string_view userId, std::string_view password, std::function<
void(std::optional<::IceGrid::AdminSessionPrx>)> response, std::function<
void(std::exception_ptr)> exception =
nullptr, std::function<
void(
bool)> sent =
nullptr,
const Ice::Context& context =
Ice::noExplicitContext)
const;
375 void _iceI_createAdminSession(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<AdminSessionPrx>>>&, std::string_view, std::string_view,
const Ice::Context&)
const;
400 void _iceI_createSessionFromSecureConnection(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<SessionPrx>>>&,
const Ice::Context&)
const;
425 void _iceI_createAdminSessionFromSecureConnection(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<AdminSessionPrx>>>&,
const Ice::Context&)
const;
455 void _iceI_getSessionTimeout(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::int32_t>>&,
const Ice::Context&)
const;
469 explicit RegistryPrx(IceInternal::ReferencePtr&& ref) :
Ice::ObjectPrx{std::move(ref)}
479#if defined(__GNUC__) && !defined(__clang__)
480# pragma GCC diagnostic push
481# pragma GCC diagnostic ignored "-Wextra"
497 ~LocatorPrx()
override;
544 void _iceI_getLocalRegistry(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<RegistryPrx>>>&,
const Ice::Context&)
const;
568 void _iceI_getLocalQuery(
const std::shared_ptr<IceInternal::OutgoingAsyncT<std::optional<QueryPrx>>>&,
const Ice::Context&)
const;
575 static
LocatorPrx _fromReference(IceInternal::ReferencePtr ref) {
return LocatorPrx{std::move(ref)}; }
582 explicit LocatorPrx(IceInternal::ReferencePtr&& ref) :
Ice::ObjectPrx{std::move(ref)}
586#if defined(__GNUC__) && !defined(__clang__)
587# pragma GCC diagnostic pop
596 class ICEGRID_API Query :
public virtual Ice::Object
600 using ProxyType = QueryPrx;
605 void dispatch(Ice::IncomingRequest& request, std::function<
void(Ice::OutgoingResponse)> sendResponse)
override;
607 [[nodiscard]] std::vector<std::string> ice_ids(
const Ice::Current& current)
const override;
609 [[nodiscard]] std::string ice_id(
const Ice::Current& current)
const override;
615 [[nodiscard]]
virtual std::optional<Ice::ObjectPrx> findObjectById(::Ice::Identity
id,
const Ice::Current& current)
const = 0;
618 void _iceD_findObjectById(Ice::IncomingRequest&, std::function<
void(Ice::OutgoingResponse)>)
const;
625 [[nodiscard]]
virtual std::optional<Ice::ObjectPrx> findObjectByType(std::string type,
const Ice::Current& current)
const = 0;
628 void _iceD_findObjectByType(Ice::IncomingRequest&, std::function<
void(Ice::OutgoingResponse)>)
const;
637 [[nodiscard]]
virtual std::optional<Ice::ObjectPrx> findObjectByTypeOnLeastLoadedNode(std::string type, LoadSample sample,
const Ice::Current& current)
const = 0;
640 void _iceD_findObjectByTypeOnLeastLoadedNode(Ice::IncomingRequest&, std::function<
void(Ice::OutgoingResponse)>)
const;
646 [[nodiscard]] virtual ::Ice::ObjectProxySeq findAllObjectsByType(std::string type,
const Ice::Current& current)
const = 0;
649 void _iceD_findAllObjectsByType(Ice::IncomingRequest&, std::function<
void(Ice::OutgoingResponse)>)
const;
655 [[nodiscard]] virtual ::Ice::ObjectProxySeq findAllReplicas(std::optional<Ice::ObjectPrx> proxy,
const Ice::Current& current)
const = 0;
658 void _iceD_findAllReplicas(Ice::IncomingRequest&, std::function<
void(Ice::OutgoingResponse)>)
const;
662 static const char* ice_staticId() noexcept;
671 class ICEGRID_API Registry : public virtual
Ice::Object
682 [[nodiscard]] std::vector<std::string> ice_ids(
const Ice::Current& current)
const override;
684 [[nodiscard]] std::string ice_id(
const Ice::Current& current)
const override;
692 virtual std::optional<SessionPrx> createSession(std::string userId, std::string password,
const Ice::Current& current) = 0;
703 virtual std::optional<AdminSessionPrx> createAdminSession(std::string userId, std::string password,
const Ice::Current& current) = 0;
712 virtual std::optional<SessionPrx> createSessionFromSecureConnection(
const Ice::Current& current) = 0;
721 virtual std::optional<AdminSessionPrx> createAdminSessionFromSecureConnection(
const Ice::Current& current) = 0;
731 [[nodiscard]]
virtual std::int32_t getSessionTimeout(
const Ice::Current& current)
const = 0;
738 static const char* ice_staticId()
noexcept;
757 [[nodiscard]] std::vector<std::string> ice_ids(
const Ice::Current& current)
const override;
759 [[nodiscard]] std::string ice_id(
const Ice::Current& current)
const override;
764 [[nodiscard]]
virtual std::optional<RegistryPrx> getLocalRegistry(
const Ice::Current& current)
const = 0;
772 [[nodiscard]]
virtual std::optional<QueryPrx> getLocalQuery(
const Ice::Current& current)
const = 0;
779 static const char* ice_staticId()
noexcept;
792 static constexpr StreamHelperCategory helper = StreamHelperCategoryEnum;
793 static constexpr int minValue = 0;
794 static constexpr int maxValue = 2;
795 static constexpr int minWireSize = 1;
796 static constexpr bool fixedLength =
false;
std::function< void()> getLocalQueryAsync(std::function< void(std::optional<::IceGrid::QueryPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the query object hosted by this IceGrid registry.
std::optional< QueryPrx > getLocalQuery(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the query object hosted by this IceGrid registry.
LocatorPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
LocatorPrx(const LocatorPrx &other) noexcept
Copy constructor.
LocatorPrx & operator=(LocatorPrx &&rhs) noexcept
Move assignment operator.
std::optional< RegistryPrx > getLocalRegistry(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the registry object hosted by this IceGrid registry.
LocatorPrx & operator=(const LocatorPrx &rhs) noexcept
Copy assignment operator.
std::function< void()> getLocalRegistryAsync(std::function< void(std::optional<::IceGrid::RegistryPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the registry object hosted by this IceGrid registry.
std::future< std::optional< RegistryPrx > > getLocalRegistryAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the registry object hosted by this IceGrid registry.
LocatorPrx(LocatorPrx &&other) noexcept
Move constructor.
std::future< std::optional< QueryPrx > > getLocalQueryAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets a proxy to the query object hosted by this IceGrid registry.
Provides access to the QueryPrx and RegistryPrx objects implemented by the IceGrid registry.
std::optional< Ice::ObjectPrx > findObjectById(const ::Ice::Identity &id, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by identity.
std::future<::Ice::ObjectProxySeq > findAllObjectsByTypeAsync(std::string_view type, const Ice::Context &context=Ice::noExplicitContext) const
Finds all the well-known objects with the given type.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::future< std::optional< Ice::ObjectPrx > > findObjectByIdAsync(const ::Ice::Identity &id, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by identity.
std::optional< Ice::ObjectPrx > findObjectByType(std::string_view type, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by type.
std::future< std::optional< Ice::ObjectPrx > > findObjectByTypeAsync(std::string_view type, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by type.
::Ice::ObjectProxySeq findAllObjectsByType(std::string_view type, const Ice::Context &context=Ice::noExplicitContext) const
Finds all the well-known objects with the given type.
std::function< void()> findObjectByIdAsync(const ::Ice::Identity &id, std::function< void(std::optional< Ice::ObjectPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by identity.
std::function< void()> findObjectByTypeAsync(std::string_view type, std::function< void(std::optional< Ice::ObjectPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by type.
QueryPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
QueryPrx(const QueryPrx &other) noexcept
Copy constructor.
std::function< void()> findObjectByTypeOnLeastLoadedNodeAsync(std::string_view type, LoadSample sample, std::function< void(std::optional< Ice::ObjectPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by type on the least-loaded node.
std::optional< Ice::ObjectPrx > findObjectByTypeOnLeastLoadedNode(std::string_view type, LoadSample sample, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by type on the least-loaded node.
std::function< void()> findAllReplicasAsync(const std::optional< Ice::ObjectPrx > &proxy, std::function< void(::Ice::ObjectProxySeq)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Finds all the replicas of a well-known object.
std::future<::Ice::ObjectProxySeq > findAllReplicasAsync(const std::optional< Ice::ObjectPrx > &proxy, const Ice::Context &context=Ice::noExplicitContext) const
Finds all the replicas of a well-known object.
QueryPrx(QueryPrx &&other) noexcept
Move constructor.
QueryPrx & operator=(QueryPrx &&rhs) noexcept
Move assignment operator.
QueryPrx & operator=(const QueryPrx &rhs) noexcept
Copy assignment operator.
std::future< std::optional< Ice::ObjectPrx > > findObjectByTypeOnLeastLoadedNodeAsync(std::string_view type, LoadSample sample, const Ice::Context &context=Ice::noExplicitContext) const
Finds a well-known object by type on the least-loaded node.
::Ice::ObjectProxySeq findAllReplicas(const std::optional< Ice::ObjectPrx > &proxy, const Ice::Context &context=Ice::noExplicitContext) const
Finds all the replicas of a well-known object.
std::function< void()> findAllObjectsByTypeAsync(std::string_view type, std::function< void(::Ice::ObjectProxySeq)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Finds all the well-known objects with the given type.
Finds well-known Ice objects registered with the IceGrid registry.
RegistryPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
std::function< void()> createSessionAsync(std::string_view userId, std::string_view password, std::function< void(std::optional<::IceGrid::SessionPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Creates a client session.
std::future< std::optional< SessionPrx > > createSessionAsync(std::string_view userId, std::string_view password, const Ice::Context &context=Ice::noExplicitContext) const
Creates a client session.
RegistryPrx & operator=(const RegistryPrx &rhs) noexcept
Copy assignment operator.
std::future< std::int32_t > getSessionTimeoutAsync(const Ice::Context &context=Ice::noExplicitContext) const
Gets the session timeout.
std::function< void()> createSessionFromSecureConnectionAsync(std::function< void(std::optional<::IceGrid::SessionPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Creates a client session from a secure connection.
std::optional< SessionPrx > createSession(std::string_view userId, std::string_view password, const Ice::Context &context=Ice::noExplicitContext) const
Creates a client session.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::function< void()> createAdminSessionAsync(std::string_view userId, std::string_view password, std::function< void(std::optional<::IceGrid::AdminSessionPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Creates an administrative session.
RegistryPrx(RegistryPrx &&other) noexcept
Move constructor.
std::future< std::optional< SessionPrx > > createSessionFromSecureConnectionAsync(const Ice::Context &context=Ice::noExplicitContext) const
Creates a client session from a secure connection.
std::int32_t getSessionTimeout(const Ice::Context &context=Ice::noExplicitContext) const
Gets the session timeout.
std::function< void()> createAdminSessionFromSecureConnectionAsync(std::function< void(std::optional<::IceGrid::AdminSessionPrx >)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Creates an administrative session from a secure connection.
std::optional< AdminSessionPrx > createAdminSessionFromSecureConnection(const Ice::Context &context=Ice::noExplicitContext) const
Creates an administrative session from a secure connection.
std::function< void()> getSessionTimeoutAsync(std::function< void(std::int32_t)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets the session timeout.
std::future< std::optional< AdminSessionPrx > > createAdminSessionFromSecureConnectionAsync(const Ice::Context &context=Ice::noExplicitContext) const
Creates an administrative session from a secure connection.
std::future< std::optional< AdminSessionPrx > > createAdminSessionAsync(std::string_view userId, std::string_view password, const Ice::Context &context=Ice::noExplicitContext) const
Creates an administrative session.
RegistryPrx(const RegistryPrx &other) noexcept
Copy constructor.
std::optional< SessionPrx > createSessionFromSecureConnection(const Ice::Context &context=Ice::noExplicitContext) const
Creates a client session from a secure connection.
std::optional< AdminSessionPrx > createAdminSession(std::string_view userId, std::string_view password, const Ice::Context &context=Ice::noExplicitContext) const
Creates an administrative session.
RegistryPrx & operator=(RegistryPrx &&rhs) noexcept
Move assignment operator.
Represents the main entry point into the IceGrid registry service.
Represents a request received by a connection.
Client applications use the Locator object to resolve Ice indirect proxies.
ObjectPrx & operator=(const ObjectPrx &rhs) noexcept=default
Copy assignment operator.
The base class for all Ice proxies.
Represents the response to an incoming request.
Provides typed proxy functions.
LoadSample
Determines which load sampling interval to use.
@ LoadSample5
Sample every five minutes.
@ LoadSample15
Sample every fifteen minutes.
@ LoadSample1
Sample every minute.
std::ostream & operator<<(std::ostream &os, ServerState value)
Outputs the enumerator name or underlying value of a ServerState to a stream.
std::shared_ptr< Locator > LocatorPtr
A shared pointer to a Locator.
std::shared_ptr< Query > QueryPtr
A shared pointer to a Query.
std::shared_ptr< Registry > RegistryPtr
A shared pointer to a Registry.
Deploy and manage Ice servers.
std::shared_ptr< Communicator > CommunicatorPtr
A shared pointer to a Communicator.
const Context noExplicitContext
Marker value used to indicate that no explicit request context was passed to a proxy invocation.
std::vector< std::optional< Ice::ObjectPrx > > ObjectProxySeq
A sequence of object proxies.
std::map< std::string, std::string, std::less<> > Context
Represents additional information carried by an Ice request.
Provides information about an incoming request being dispatched.