Package com.zeroc.Glacier2
Interface Router
- All Superinterfaces:
com.zeroc.Ice.Object,com.zeroc.Ice.Router
public interface Router
extends com.zeroc.Ice.Router
The Glacier2 specialization of the
Ice::Router interface.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.zeroc.Ice.Object
com.zeroc.Ice.Object.Ice_invokeResultNested classes/interfaces inherited from interface com.zeroc.Ice.Router
com.zeroc.Ice.Router.GetClientProxyResult -
Method Summary
Modifier and TypeMethodDescriptioncreateSessionAsync(String userId, String password, com.zeroc.Ice.Current current) Create a per-client session with the router.createSessionFromSecureConnectionAsync(com.zeroc.Ice.Current current) Create a per-client session with the router.voiddestroySession(com.zeroc.Ice.Current current) Destroy the calling client's session with this router.intgetACMTimeout(com.zeroc.Ice.Current current) Get the value of the ACM timeout.getCategoryForClient(com.zeroc.Ice.Current current) This category must be used in the identities of all of the client's callback objects.longgetSessionTimeout(com.zeroc.Ice.Current current) Get the value of the session timeout.default Stringice_id(com.zeroc.Ice.Current current) default String[]ice_ids(com.zeroc.Ice.Current current) static StringrefreshSessionAsync(com.zeroc.Ice.Current current) Keep the calling client's session with this router alive.Methods inherited from interface com.zeroc.Ice.Object
_iceRead, _iceReadImpl, _iceWrite, _iceWriteImpl, ice_dispatch, ice_isA, ice_pingMethods inherited from interface com.zeroc.Ice.Router
addProxies, getClientProxy, getServerProxy
-
Method Details
-
getCategoryForClient
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:
current- The Current object for the invocation.- Returns:
- The category.
-
createSessionAsync
CompletionStage<SessionPrx> createSessionAsync(String userId, String password, com.zeroc.Ice.Current current) throws CannotCreateSessionException, PermissionDeniedException Create a per-client session with the router. If aSessionManagerhas been installed, a proxy to aSessionobject 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:
userId- The user id for which to check the password.password- The password for the given user id.current- The Current object for the invocation.- Returns:
- A proxy for the newly created session, or null if no
SessionManagerhas been installed. - Throws:
CannotCreateSessionException- Raised if the session cannot be created.PermissionDeniedException- Raised if the password for the given user id is not correct, or if the user is not allowed access.- See Also:
-
createSessionFromSecureConnectionAsync
CompletionStage<SessionPrx> createSessionFromSecureConnectionAsync(com.zeroc.Ice.Current current) throws CannotCreateSessionException, PermissionDeniedException Create a per-client session with the router. The user is authenticated through the SSL certificates that have been associated with the connection. If aSessionManagerhas been installed, a proxy to aSessionobject 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:
current- The Current object for the invocation.- Returns:
- A proxy for the newly created session, or null if no
SessionManagerhas been installed. - Throws:
CannotCreateSessionException- Raised if the session cannot be created.PermissionDeniedException- Raised if the user cannot be authenticated or if the user is not allowed access.- See Also:
-
refreshSessionAsync
CompletionStage<Void> refreshSessionAsync(com.zeroc.Ice.Current current) throws SessionNotExistException Keep the calling client's session with this router alive.- Parameters:
current- The Current object for the invocation.- Returns:
- A completion stage that the servant will complete when the invocation completes.
- Throws:
SessionNotExistException- Raised if no session exists for the calling client.
-
destroySession
Destroy the calling client's session with this router.- Parameters:
current- The Current object for the invocation.- Throws:
SessionNotExistException- Raised if no session exists for the calling client.
-
getSessionTimeout
long getSessionTimeout(com.zeroc.Ice.Current current) Get the value of the session timeout. Sessions are destroyed if they see no activity for this period of time.- Parameters:
current- The Current object for the invocation.- Returns:
- The timeout (in seconds).
-
getACMTimeout
int getACMTimeout(com.zeroc.Ice.Current current) 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:
current- The Current object for the invocation.- Returns:
- The timeout (in seconds).
-
ice_ids
- Specified by:
ice_idsin interfacecom.zeroc.Ice.Object- Specified by:
ice_idsin interfacecom.zeroc.Ice.Router
-
ice_id
- Specified by:
ice_idin interfacecom.zeroc.Ice.Object- Specified by:
ice_idin interfacecom.zeroc.Ice.Router
-
ice_staticId
-