Ice
3.9
Slice API Reference
Toggle main menu visibility
Loading...
Searching...
No Matches
Glacier2
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"
]
19
module
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
24
exception
SessionNotExistException
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
Session
*
createSession
(
string
userId,
string
password)
53
throws
PermissionDeniedException
,
CannotCreateSessionException
;
54
55
/// Creates a per-client session with the router. The user is authenticated through the SSL certificate(s)
56
/// associated with the connection. If an {@link SSLSessionManager} is configured, a proxy to a {@link Session}
57
/// object is returned to the client. Otherwise, null is returned and only an internal session (i.e., not
58
/// visible to the client) is created.
59
/// If a non-null session proxy is returned, it must be configured to route through the router that created it.
60
/// This occurs automatically when the router is configured as the client's default router at the time the
61
/// session proxy is created in the client application; otherwise, the client must configure the session proxy
62
/// explicitly.
63
/// @return A proxy for the newly created session, or null if no {@link SSLSessionManager} is configured.
64
/// @throws PermissionDeniedException Thrown when an authentication or authorization failure occurs.
65
/// @throws CannotCreateSessionException Thrown when the session cannot be created.
66
/// @see Session
67
/// @see SessionManager
68
/// @see PermissionsVerifier
69
Session
*
createSessionFromSecureConnection
()
70
throws
PermissionDeniedException
,
CannotCreateSessionException
;
71
72
/// Keeps the session with this router alive.
73
/// @throws SessionNotExistException Thrown when no session exists for the caller (client).
74
[
"deprecated:As of Ice 3.8, this operation does nothing."
]
75
void
refreshSession
()
76
throws
SessionNotExistException
;
77
78
/// Destroys the session of the caller with this router.
79
/// @throws SessionNotExistException Thrown when no session exists for the caller (client).
80
void
destroySession
()
81
throws
SessionNotExistException
;
82
83
/// Gets the idle timeout used by the server-side of the connection.
84
/// @return The idle timeout (in seconds).
85
[
"cpp:const"
]
86
idempotent
long
getSessionTimeout
();
87
88
/// Gets the idle timeout used by the server-side of the connection.
89
/// @return The idle timeout (in seconds).
90
[
"cpp:const"
]
91
idempotent
int
getACMTimeout
();
92
}
93
}
Glacier2::CannotCreateSessionException
The exception that is thrown when an attempt to create a new session fails.
Definition
Session.ice:24
Glacier2::PermissionDeniedException
The exception that is thrown when a client is not allowed to create a session.
Definition
PermissionsVerifier.ice:20
Glacier2::SessionNotExistException
The exception that is thrown when a client tries to destroy a session with a router,...
Definition
Router.ice:25
Glacier2::Router::getACMTimeout
idempotent int getACMTimeout()
Gets the idle timeout used by the server-side of the connection.
Glacier2::Router::refreshSession
void refreshSession()
Keeps the session with this router alive.
Glacier2::Router::getSessionTimeout
idempotent long getSessionTimeout()
Gets the idle timeout used by the server-side of the connection.
Glacier2::Router::createSessionFromSecureConnection
Session * createSessionFromSecureConnection()
Creates a per-client session with the router.
Glacier2::Router::getCategoryForClient
idempotent string getCategoryForClient()
Gets a unique category that identifies the client (caller) in the router.
Glacier2::Router::createSession
Session * createSession(string userId, string password)
Creates a session for the client (caller) with the router.
Glacier2::Router::destroySession
void destroySession()
Destroys the session of the caller with this router.
Glacier2::Router
The Glacier2 specialization of the Ice::Router interface.
Definition
Router.ice:30
Glacier2::Session
Represents a session between a client application and the Glacier2 router.
Definition
Session.ice:35
Ice::Router
Represents an intermediary object that routes requests and replies between clients and Ice objects th...
Definition
Router.ice:19
Glacier2
Communicate through firewalls and across NATs.
Definition
PermissionsVerifier.ice:17
Generated by
1.17.0