Ice
3.9
Slice API Reference
Toggle main menu visibility
Loading...
Searching...
No Matches
Glacier2
Session.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/BuiltinSequences.ice"
14
#include "Ice/Identity.ice"
15
#include "SSLInfo.ice"
16
17
[
"java:identifier:com.zeroc.Glacier2"
]
18
module
Glacier2
19
{
20
interface
Router;
// So that doc-comments can link to `Glacier2::Router`.
21
22
/// The exception that is thrown when an attempt to create a new session fails.
23
exception
CannotCreateSessionException
24
{
25
/// The reason why the session creation failed.
26
string
reason
;
27
}
28
29
/// Represents a session between a client application and the Glacier2 router. With Glacier2, the lifetime of a
30
/// session is tied to the Ice connection between the client and the router: the session is destroyed when the
31
/// connection is closed.
32
/// @see Router
33
/// @see SessionManager
34
interface
Session
35
{
36
/// Destroys this session.
37
void
destroy
();
38
}
39
40
/// Manages a set of constraints on a {@link Session}.
41
/// @see SessionControl
42
interface
StringSet
43
{
44
/// Adds a sequence of strings to this set of constraints. Order is not preserved and duplicates are implicitly
45
/// removed.
46
/// @param additions The sequence of strings to add.
47
idempotent
void
add
(
Ice::StringSeq
additions);
48
49
/// Removes a sequence of strings from this set of constraints. No errors are returned if an entry is not found.
50
/// @param deletions The sequence of strings to remove.
51
idempotent
void
remove
(
Ice::StringSeq
deletions);
52
53
/// Gets a sequence of strings describing the constraints in this set.
54
/// @return The sequence of strings for this set.
55
[
"swift:identifier:`get`"
]
56
idempotent
Ice::StringSeq
get
();
57
}
58
59
/// Manages a set of object identity constraints on a {@link Session}.
60
/// @see SessionControl
61
interface
IdentitySet
62
{
63
/// Adds a sequence of Ice identities to this set of constraints. Order is not preserved and duplicates are
64
/// implicitly removed.
65
/// @param additions The sequence of Ice identities to add.
66
idempotent
void
add
(
Ice::IdentitySeq
additions);
67
68
/// Removes a sequence of identities from this set of constraints. No errors are returned if an entry is not
69
/// found.
70
/// @param deletions The sequence of Ice identities to remove.
71
idempotent
void
remove
(
Ice::IdentitySeq
deletions);
72
73
/// Gets a sequence of identities describing the constraints in this set.
74
/// @return The sequence of Ice identities for this set.
75
[
"swift:identifier:`get`"
]
76
idempotent
Ice::IdentitySeq
get
();
77
}
78
79
/// Represents a router-provided object that allows an application-provided session manager to configure the
80
/// routing constraints for a session.
81
/// @see SessionManager
82
interface
SessionControl
83
{
84
/// Gets a proxy to the object that manages the allowable categories for object identities for this session.
85
/// @return A proxy to a {@link StringSet} object. This proxy is never null.
86
StringSet
*
categories
();
87
88
/// Gets a proxy to the object that manages the allowable adapter identities for objects for this session.
89
/// @return A proxy to a {@link StringSet} object. This proxy is never null.
90
StringSet
*
adapterIds
();
91
92
/// Gets a proxy to the object that manages the allowable object identities for this session.
93
/// @return A proxy to an {@link IdentitySet} object. This proxy is never null.
94
IdentitySet
*
identities
();
95
96
/// Gets the session timeout.
97
/// @return The timeout.
98
idempotent
int
getSessionTimeout
();
99
100
/// Destroys the associated session.
101
void
destroy
();
102
}
103
104
/// Represents an application-provided factory for session objects. You can configure a Glacier2 router with your
105
/// own SessionManager implementation; this router will then return the sessions created by this session manager to
106
/// its clients.
107
interface
SessionManager
108
{
109
/// Creates a new session object.
110
/// @param userId The user ID for the session.
111
/// @param control A proxy to the session control object. This proxy is null when `Glacier2.Server.Endpoints`
112
/// is not configured.
113
/// @return A proxy to the newly created session. This proxy is never null.
114
/// @throws CannotCreateSessionException Thrown when the session cannot be created.
115
Session
*
create
(
string
userId,
SessionControl
* control)
116
throws
CannotCreateSessionException
;
117
}
118
119
/// Represents an application-provided factory for session objects. You can configure a Glacier2 router with your
120
/// own SSLSessionManager implementation; this router will then return the sessions created by this session manager
121
/// to its clients.
122
interface
SSLSessionManager
123
{
124
/// Creates a new session object.
125
/// @param info The SSL info.
126
/// @param control A proxy to the session control object. This proxy is null when `Glacier2.Server.Endpoints`
127
/// is not configured.
128
/// @return A proxy to the newly created session. This proxy is never null.
129
/// @throws CannotCreateSessionException Thrown when the session cannot be created.
130
Session
*
create
(
SSLInfo
info,
SessionControl
* control)
131
throws
CannotCreateSessionException
;
132
}
133
}
Glacier2::CannotCreateSessionException::reason
string reason
The reason why the session creation failed.
Definition
Session.ice:26
Glacier2::CannotCreateSessionException
The exception that is thrown when an attempt to create a new session fails.
Definition
Session.ice:24
Glacier2::IdentitySet::add
idempotent void add(Ice::IdentitySeq additions)
Adds a sequence of Ice identities to this set of constraints.
Glacier2::IdentitySet
Manages a set of object identity constraints on a Session.
Definition
Session.ice:62
Glacier2::SSLSessionManager::create
Session * create(SSLInfo info, SessionControl *control)
Creates a new session object.
Glacier2::SSLSessionManager
Represents an application-provided factory for session objects.
Definition
Session.ice:123
Glacier2::SessionControl::adapterIds
StringSet * adapterIds()
Gets a proxy to the object that manages the allowable adapter identities for objects for this session...
Glacier2::SessionControl::getSessionTimeout
idempotent int getSessionTimeout()
Gets the session timeout.
Glacier2::SessionControl::categories
StringSet * categories()
Gets a proxy to the object that manages the allowable categories for object identities for this sessi...
Glacier2::SessionControl::identities
IdentitySet * identities()
Gets a proxy to the object that manages the allowable object identities for this session.
Glacier2::SessionControl
Represents a router-provided object that allows an application-provided session manager to configure ...
Definition
Session.ice:83
Glacier2::SessionControl::destroy
void destroy()
Destroys the associated session.
Glacier2::SessionManager::create
Session * create(string userId, SessionControl *control)
Creates a new session object.
Glacier2::SessionManager
Represents an application-provided factory for session objects.
Definition
Session.ice:108
Glacier2::Session
Represents a session between a client application and the Glacier2 router.
Definition
Session.ice:35
Glacier2::Session::destroy
void destroy()
Destroys this session.
Glacier2::StringSet::add
idempotent void add(Ice::StringSeq additions)
Adds a sequence of strings to this set of constraints.
Glacier2::StringSet
Manages a set of constraints on a Session.
Definition
Session.ice:43
Glacier2
Communicate through firewalls and across NATs.
Definition
PermissionsVerifier.ice:17
Ice::IdentitySeq
sequence< Identity > IdentitySeq
A sequence of identities.
Definition
Identity.ice:38
Ice::StringSeq
sequence< string > StringSeq
A sequence of strings.
Definition
BuiltinSequences.ice:46
Glacier2::SSLInfo
Represents information gathered from an incoming SSL connection and used for authentication and autho...
Definition
SSLInfo.ice:23
Generated by
1.17.0