// // Copyright (c) ZeroC, Inc. All rights reserved. // #ifndef GLACIER2_ROUTER_I_H #define GLACIER2_ROUTER_I_H #include #include #include #include namespace Glacier2 { class RoutingTable; class RouterI; class FilterManager; class RouterI final : public Router { public: RouterI(std::shared_ptr, std::shared_ptr, const std::string&, std::shared_ptr, const Ice::Identity&, std::shared_ptr, const Ice::Context&); void destroy(std::function); std::shared_ptr getClientProxy(Ice::optional&, const Ice::Current&) const override; std::shared_ptr getServerProxy(const Ice::Current&) const override; Ice::ObjectProxySeq addProxies(Ice::ObjectProxySeq, const Ice::Current&) override; std::string getCategoryForClient(const Ice::Current&) const override; void createSessionAsync(std::string, std::string, std::function& returnValue)>, std::function, const Ice::Current&) override; void createSessionFromSecureConnectionAsync( std::function& returnValue)>, std::function, const Ice::Current&) override; void refreshSessionAsync(std::function, std::function, const Ice::Current&) override; void destroySession(const Ice::Current&) override; long long int getSessionTimeout(const Ice::Current&) const override; int getACMTimeout(const Ice::Current&) const override; std::shared_ptr getClientBlobject() const; std::shared_ptr getServerBlobject() const; std::shared_ptr getSession() const; std::chrono::steady_clock::time_point getTimestamp() const; void updateTimestamp() const; void updateObserver(const std::shared_ptr&); std::string toString() const; private: const std::shared_ptr _instance; const std::shared_ptr _routingTable; const std::shared_ptr _clientProxy; const std::shared_ptr _serverProxy; const std::shared_ptr _clientBlobject; const std::shared_ptr _serverBlobject; const bool _clientBlobjectBuffered; const bool _serverBlobjectBuffered; const std::shared_ptr _connection; const std::string _userId; const std::shared_ptr _session; const Ice::Identity _controlId; const Ice::Context _context; const std::mutex _timestampMutex; mutable std::chrono::steady_clock::time_point _timestamp; std::shared_ptr _observer; }; } #endif