Ice 3.7 C++11 API Reference
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Glacier2::Router Class Referenceabstract

The Glacier2 specialization of the Ice::Router interface. More...

#include <Glacier2/Glacier2.h>

Inheritance diagram for Glacier2::Router:
Inheritance graph
[legend]
Collaboration diagram for Glacier2::Router:
Collaboration graph
[legend]

Public Types

using ProxyType = RouterPrx
 
- Public Types inherited from Ice::Router
using ProxyType = RouterPrx
 

Public Member Functions

virtual void createSessionAsync (::std::string userId, ::std::string password, ::std::function< void(const ::std::shared_ptr< SessionPrx > &returnValue)> response, ::std::function< void(::std::exception_ptr)> exception, const ::Ice::Current &current)=0
 Create a per-client session with the router. More...
 
virtual void createSessionFromSecureConnectionAsync (::std::function< void(const ::std::shared_ptr< SessionPrx > &returnValue)> response, ::std::function< void(::std::exception_ptr)> exception, const ::Ice::Current &current)=0
 Create a per-client session with the router. More...
 
virtual void destroySession (const ::Ice::Current &current)=0
 Destroy the calling client's session with this router. More...
 
virtual int getACMTimeout (const ::Ice::Current &current) const =0
 Get the value of the ACM timeout. More...
 
virtual ::std::string getCategoryForClient (const ::Ice::Current &current) const =0
 This category must be used in the identities of all of the client's callback objects. More...
 
virtual long long int getSessionTimeout (const ::Ice::Current &current) const =0
 Get the value of the session timeout. More...
 
virtual ::std::string ice_id (const ::Ice::Current &current) const override
 Obtains a Slice type ID representing the most-derived interface supported by this object. More...
 
virtual ::std::vector<::std::string > ice_ids (const ::Ice::Current &current) const override
 Obtains a list of the Slice type IDs representing the interfaces supported by this object. More...
 
virtual bool ice_isA (::std::string id, const ::Ice::Current &current) const override
 Determines whether this object supports an interface with the given Slice type ID. More...
 
virtual void refreshSessionAsync (::std::function< void()> response, ::std::function< void(::std::exception_ptr)> exception, const ::Ice::Current &current)=0
 Keep the calling client's session with this router alive. More...
 
- Public Member Functions inherited from Ice::Router
virtual ObjectProxySeq addProxies (ObjectProxySeq proxies, const Current &current)=0
 Add new proxy information to the router's routing table. More...
 
virtual ::std::shared_ptr< ObjectPrxgetClientProxy (Ice::optional< bool > &hasRoutingTable, const Current &current) const =0
 Get the router's client proxy, i.e., the proxy to use for forwarding requests from the client to the router. More...
 
virtual ::std::shared_ptr< ObjectPrxgetServerProxy (const Current &current) const =0
 Get the router's server proxy, i.e., the proxy to use for forwarding requests from the server to the router. More...
 
virtual ::std::string ice_id (const Current &current) const override
 Obtains a Slice type ID representing the most-derived interface supported by this object. More...
 
virtual ::std::vector<::std::string > ice_ids (const Current &current) const override
 Obtains a list of the Slice type IDs representing the interfaces supported by this object. More...
 
virtual bool ice_isA (::std::string id, const Current &current) const override
 Determines whether this object supports an interface with the given Slice type ID. More...
 
- Public Member Functions inherited from Ice::Object
virtual bool ice_dispatch (Ice::Request &request, std::function< bool()> response=nullptr, std::function< bool(std::exception_ptr)> error=nullptr)
 Dispatches an invocation to a servant. More...
 
virtual bool ice_isA (std::string s, const Current &current) const
 Tests whether this object supports a specific Slice interface. More...
 
virtual void ice_ping (const Current &current) const
 Tests whether this object can be reached. More...
 
virtual ~Object ()=default
 

Static Public Member Functions

static const ::std::string & ice_staticId ()
 Obtains the Slice type ID corresponding to this class. More...
 
- Static Public Member Functions inherited from Ice::Router
static const ::std::string & ice_staticId ()
 Obtains the Slice type ID corresponding to this class. More...
 
- Static Public Member Functions inherited from Ice::Object
static const std::string & ice_staticId ()
 Obtains the Slice type ID of this type. More...
 

Detailed Description

The Glacier2 specialization of the Ice::Router interface.

Member Typedef Documentation

◆ ProxyType

Member Function Documentation

◆ createSessionAsync()

virtual void Glacier2::Router::createSessionAsync ( ::std::string  userId,
::std::string  password,
::std::function< void(const ::std::shared_ptr< SessionPrx > &returnValue)>  response,
::std::function< void(::std::exception_ptr)>  exception,
const ::Ice::Current current 
)
pure virtual

Create a per-client session with the router.

If a SessionManager has been installed, a proxy to a Session object is returned to the client. Otherwise, null is returned and only an internal session (i.e., not visible to the client) is created.

If a session proxy is returned, it must be configured to route through the router that created it. This will happen automatically if the router is configured as the client's default router at the time the session proxy is created in the client process, otherwise the client must configure the session proxy explicitly.

Parameters
userIdThe user id for which to check the password.
passwordThe password for the given user id.
responseThe response callback.
exceptionThe exception callback.
currentThe Current object for the invocation.
Exceptions
Glacier2::CannotCreateSessionExceptionRaised if the session cannot be created.
Glacier2::PermissionDeniedExceptionRaised if the password for the given user id is not correct, or if the user is not allowed access.
See also
Session
SessionManager
PermissionsVerifier

◆ createSessionFromSecureConnectionAsync()

virtual void Glacier2::Router::createSessionFromSecureConnectionAsync ( ::std::function< void(const ::std::shared_ptr< SessionPrx > &returnValue)>  response,
::std::function< void(::std::exception_ptr)>  exception,
const ::Ice::Current current 
)
pure virtual

Create a per-client session with the router.

The user is authenticated through the SSL certificates that have been associated with the connection. If a SessionManager has been installed, a proxy to a Session object is returned to the client. Otherwise, null is returned and only an internal session (i.e., not visible to the client) is created.

If a session proxy is returned, it must be configured to route through the router that created it. This will happen automatically if the router is configured as the client's default router at the time the session proxy is created in the client process, otherwise the client must configure the session proxy explicitly.

Parameters
responseThe response callback.
exceptionThe exception callback.
currentThe Current object for the invocation.
Exceptions
Glacier2::CannotCreateSessionExceptionRaised if the session cannot be created.
Glacier2::PermissionDeniedExceptionRaised if the user cannot be authenticated or if the user is not allowed access.
See also
Session
SessionManager
PermissionsVerifier

◆ destroySession()

virtual void Glacier2::Router::destroySession ( const ::Ice::Current current)
pure virtual

Destroy the calling client's session with this router.

Parameters
currentThe Current object for the invocation.
Exceptions
Glacier2::SessionNotExistExceptionRaised if no session exists for the calling client.

◆ getACMTimeout()

virtual int Glacier2::Router::getACMTimeout ( const ::Ice::Current current) const
pure virtual

Get the value of the ACM timeout.

Clients supporting connection heartbeats can enable them instead of explicitly sending keep alives requests.

NOTE: This method is only available since Ice 3.6.

Parameters
currentThe Current object for the invocation.
Returns
The timeout (in seconds).

◆ getCategoryForClient()

virtual ::std::string Glacier2::Router::getCategoryForClient ( const ::Ice::Current current) const
pure virtual

This category must be used in the identities of all of the client's callback objects.

This is necessary in order for the router to forward callback requests to the intended client. If the Glacier2 server endpoints are not set, the returned category is an empty string.

Parameters
currentThe Current object for the invocation.
Returns
The category.

◆ getSessionTimeout()

virtual long long int Glacier2::Router::getSessionTimeout ( const ::Ice::Current current) const
pure virtual

Get the value of the session timeout.

Sessions are destroyed if they see no activity for this period of time.

Parameters
currentThe Current object for the invocation.
Returns
The timeout (in seconds).

◆ ice_id()

virtual ::std::string Glacier2::Router::ice_id ( const ::Ice::Current current) const
override

Obtains a Slice type ID representing the most-derived interface supported by this object.

Parameters
currentThe Current object for the invocation.
Returns
A fully-scoped type ID.

◆ ice_ids()

virtual ::std::vector<::std::string> Glacier2::Router::ice_ids ( const ::Ice::Current current) const
override

Obtains a list of the Slice type IDs representing the interfaces supported by this object.

Parameters
currentThe Current object for the invocation.
Returns
A list of fully-scoped type IDs.

◆ ice_isA()

virtual bool Glacier2::Router::ice_isA ( ::std::string  id,
const ::Ice::Current current 
) const
overridevirtual

Determines whether this object supports an interface with the given Slice type ID.

Parameters
idThe fully-scoped Slice type ID.
currentThe Current object for the invocation.
Returns
True if this object supports the interface, false, otherwise.

◆ ice_staticId()

static const ::std::string& Glacier2::Router::ice_staticId ( )
static

Obtains the Slice type ID corresponding to this class.

Returns
A fully-scoped type ID.

◆ refreshSessionAsync()

virtual void Glacier2::Router::refreshSessionAsync ( ::std::function< void()>  response,
::std::function< void(::std::exception_ptr)>  exception,
const ::Ice::Current current 
)
pure virtual

Keep the calling client's session with this router alive.

Parameters
responseThe response callback.
exceptionThe exception callback.
currentThe Current object for the invocation.
Exceptions
Glacier2::SessionNotExistExceptionRaised if no session exists for the calling client.

The documentation for this class was generated from the following file: