Package com.zeroc.Glacier2
Interface Router
The Glacier2 specialization of the
Ice::Router
interface.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.zeroc.Ice.Object
Object.Ice_invokeResult
Nested classes/interfaces inherited from interface com.zeroc.Ice.Router
Router.GetClientProxyResult
-
Method Summary
Modifier and TypeMethodDescriptioncreateSessionAsync
(String userId, String password, Current current) Create a per-client session with the router.Create a per-client session with the router.void
destroySession
(Current current) Destroy the calling client's session with this router.int
getACMTimeout
(Current current) Get the value of the ACM timeout.getCategoryForClient
(Current current) This category must be used in the identities of all of the client's callback objects.long
getSessionTimeout
(Current current) Get the value of the session timeout.default String
Returns the Slice type ID of the most-derived interface supported by this object.default String[]
Returns the Slice type IDs of the interfaces supported by this object.static String
Returns the Slice type ID of the interface supported by this object.refreshSessionAsync
(Current current) Keep the calling client's session with this router alive.Methods inherited from interface com.zeroc.Ice.Object
ice_dispatch, ice_isA, ice_ping
Methods 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, Current current) throws CannotCreateSessionException, PermissionDeniedException Create a per-client session with the router. If aSessionManager
has been installed, a proxy to aSession
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:
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
SessionManager
has 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(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 aSessionManager
has been installed, a proxy to aSession
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:
current
- The Current object for the invocation.- Returns:
- A proxy for the newly created session, or null if no
SessionManager
has 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
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
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
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
Description copied from interface:Object
Returns the Slice type IDs of the interfaces supported by this object.- Specified by:
ice_ids
in interfaceObject
- Specified by:
ice_ids
in interfaceRouter
- Parameters:
current
- TheCurrent
object for the invocation.- Returns:
- The Slice type IDs of the interfaces supported by this object, in base-to-derived
order. The first element of the returned array is always
::Ice::Object
.
-
ice_id
Description copied from interface:Object
Returns the Slice type ID of the most-derived interface supported by this object. -
ice_staticId
Description copied from interface:Object
Returns the Slice type ID of the interface supported by this object.- Returns:
- The return value is always ::Ice::Object.
-