The Glacier2 specialization of the
RouterPrx
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) Creates a session for the client (caller) with the router.Creates a per-client session with the router.void
destroySession
(Current current) Destroys the session of the caller with this router.default CompletionStage<OutgoingResponse>
dispatch
(IncomingRequest request) Dispatches an incoming request to one of the methods of this generated interface, based on the operation name carried by the request.int
getACMTimeout
(Current current) Gets the idle timeout used by the server-side of the connection.getCategoryForClient
(Current current) Gets a unique category that identifies the client (caller) in the router.long
getSessionTimeout
(Current current) Gets the idle timeout used by the server-side of the connection.static String
Gets the type ID of the associated Slice interface.void
refreshSession
(Current current) Keeps the session with this router alive.Methods inherited from interface com.zeroc.Ice.Router
addProxies, getClientProxy, getServerProxy
-
Method Details
-
getCategoryForClient
Gets a unique category that identifies the client (caller) in the router. This category must be used in the identities of all the client's callback objects.- Parameters:
current
- The Current object of the incoming request.- Returns:
- The category. It's an empty string when
Glacier2.Server.Endpoints
is not configured.
-
createSessionAsync
CompletionStage<SessionPrx> createSessionAsync(String userId, String password, Current current) throws PermissionDeniedException, CannotCreateSessionException Creates a session for the client (caller) with the router. If aSessionManagerPrx
is configured, a proxy to aSessionPrx
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 non-null session proxy is returned, it must be configured to route through the router that created it. This occurs automatically when the router is configured as the client's default router at the time the session proxy is created in the client application; otherwise, the client must configure the session proxy explicitly.- Parameters:
userId
- The user ID.password
- The password.current
- The Current object of the incoming request.- Returns:
- A proxy for the newly created session, or null if no
SessionManagerPrx
is configured. - Throws:
CannotCreateSessionException
- Thrown when the session cannot be created.PermissionDeniedException
- Thrown when an authentication or authorization failure occurs.- See Also:
-
createSessionFromSecureConnectionAsync
CompletionStage<SessionPrx> createSessionFromSecureConnectionAsync(Current current) throws PermissionDeniedException, CannotCreateSessionException Creates a per-client session with the router. The user is authenticated through the SSL certificate(s) associated with the connection. If anSSLSessionManagerPrx
is configured, a proxy to aSessionPrx
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 non-null session proxy is returned, it must be configured to route through the router that created it. This occurs automatically when the router is configured as the client's default router at the time the session proxy is created in the client application; otherwise, the client must configure the session proxy explicitly.- Parameters:
current
- The Current object of the incoming request.- Returns:
- A proxy for the newly created session, or null if no
SSLSessionManagerPrx
is configured. - Throws:
CannotCreateSessionException
- Thrown when the session cannot be created.PermissionDeniedException
- Thrown when an authentication or authorization failure occurs.- See Also:
-
refreshSession
Keeps the session with this router alive.- Parameters:
current
- The Current object of the incoming request.- Throws:
SessionNotExistException
- Thrown when no session exists for the caller (client).
-
destroySession
Destroys the session of the caller with this router.- Parameters:
current
- The Current object of the incoming request.- Throws:
SessionNotExistException
- Thrown when no session exists for the caller (client).
-
getSessionTimeout
Gets the idle timeout used by the server-side of the connection.- Parameters:
current
- The Current object of the incoming request.- Returns:
- The idle timeout (in seconds).
-
getACMTimeout
Gets the idle timeout used by the server-side of the connection.- Parameters:
current
- The Current object of the incoming request.- Returns:
- The idle timeout (in seconds).
-
ice_staticId
Gets the type ID of the associated Slice interface.- Returns:
- the string "::Glacier2::Router"
-
dispatch
Dispatches an incoming request to one of the methods of this generated interface, based on the operation name carried by the request.- Specified by:
dispatch
in interfaceObject
- Specified by:
dispatch
in interfaceRouter
- Parameters:
request
- the incoming request- Returns:
- the outgoing response
- Throws:
UserException
- if aUserException
is thrown, Ice will marshal it as the response payload.
-