Ice 3.8
Slice API Reference
Loading...
Searching...
No Matches
Router.ice
1// Copyright (c) ZeroC, Inc.
2
3#pragma once
4
5[["cpp:dll-export:GLACIER2_API"]]
6[["cpp:doxygen:include:Glacier2/Glacier2.h"]]
7[["cpp:header-ext:h"]]
8
9[["cpp:include:Glacier2/Config.h"]]
10
11[["js:module:@zeroc/ice"]]
12
13#include "Ice/Router.ice"
14#include "PermissionsVerifier.ice"
15#include "Session.ice"
16
17/// Communicate through firewalls and across NATs.
18["java:identifier:com.zeroc.Glacier2"]
19module Glacier2
20{
21 /// The exception that is thrown when a client tries to destroy a session with a router, but no session exists for
22 /// this client.
23 /// @see Router#destroySession
25 {
26 }
27
28 /// The Glacier2 specialization of the {@link Ice::Router} interface.
29 interface Router extends Ice::Router
30 {
31 /// Gets a unique category that identifies the client (caller) in the router. This category must be used in the
32 /// identities of all the client's callback objects.
33 /// @return The category. It's an empty string when `Glacier2.Server.Endpoints` is not configured.
34 ["cpp:const"]
35 idempotent string getCategoryForClient();
36
37 /// Creates a session for the client (caller) with the router. If a {@link SessionManager} is configured,
38 /// a proxy to a {@link Session} object is returned to the client. Otherwise, null is returned and only an
39 /// internal session (i.e., not visible to the client) is created.
40 /// If a non-null session proxy is returned, it must be configured to route through the router that created it.
41 /// This occurs automatically when the router is configured as the client's default router at the time the
42 /// session proxy is created in the client application; otherwise, the client must configure the session proxy
43 /// explicitly.
44 /// @param userId The user ID.
45 /// @param password The password.
46 /// @return A proxy for the newly created session, or null if no {@link SessionManager} is configured.
47 /// @throws PermissionDeniedException Thrown when an authentication or authorization failure occurs.
48 /// @throws CannotCreateSessionException Thrown when the session cannot be created.
49 /// @see Session
50 /// @see SessionManager
51 /// @see PermissionsVerifier
52 ["amd"]
53 Session* createSession(string userId, string password)
55
56 /// Creates a per-client session with the router. The user is authenticated through the SSL certificate(s)
57 /// associated with the connection. If an {@link SSLSessionManager} is configured, a proxy to a {@link Session}
58 /// object is returned to the client. Otherwise, null is returned and only an internal session (i.e., not
59 /// visible to the client) is created.
60 /// If a non-null session proxy is returned, it must be configured to route through the router that created it.
61 /// This occurs automatically when the router is configured as the client's default router at the time the
62 /// session proxy is created in the client application; otherwise, the client must configure the session proxy
63 /// explicitly.
64 /// @return A proxy for the newly created session, or null if no {@link SSLSessionManager} is configured.
65 /// @throws PermissionDeniedException Thrown when an authentication or authorization failure occurs.
66 /// @throws CannotCreateSessionException Thrown when the session cannot be created.
67 /// @see Session
68 /// @see SessionManager
69 /// @see PermissionsVerifier
70 ["amd"]
73
74 /// Keeps the session with this router alive.
75 /// @throws SessionNotExistException Thrown when no session exists for the caller (client).
76 ["deprecated:As of Ice 3.8, this operation does nothing."]
79
80 /// Destroys the session of the caller with this router.
81 /// @throws SessionNotExistException Thrown when no session exists for the caller (client).
84
85 /// Gets the idle timeout used by the server-side of the connection.
86 /// @return The idle timeout (in seconds).
87 ["cpp:const"]
88 idempotent long getSessionTimeout();
89
90 /// Gets the idle timeout used by the server-side of the connection.
91 /// @return The idle timeout (in seconds).
92 ["cpp:const"]
93 idempotent int getACMTimeout();
94 }
95}
The exception that is thrown when an attempt to create a new session fails.
Definition Session.ice:24
The exception that is thrown when a client is not allowed to create a session.
The exception that is thrown when a client tries to destroy a session with a router,...
Definition Router.ice:25
idempotent int getACMTimeout()
Gets the idle timeout used by the server-side of the connection.
void refreshSession()
Keeps the session with this router alive.
idempotent long getSessionTimeout()
Gets the idle timeout used by the server-side of the connection.
Session * createSessionFromSecureConnection()
Creates a per-client session with the router.
idempotent string getCategoryForClient()
Gets a unique category that identifies the client (caller) in the router.
Session * createSession(string userId, string password)
Creates a session for the client (caller) with the router.
void destroySession()
Destroys the session of the caller with this router.
The Glacier2 specialization of the Ice::Router interface.
Definition Router.ice:30
Represents a session between a client application and the Glacier2 router.
Definition Session.ice:35
Represents an intermediary object that routes requests and replies between clients and Ice objects th...
Definition Router.ice:19
Communicate through firewalls and across NATs.