Ice 3.8
Slice API Reference
Loading...
Searching...
No Matches
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"]
18module 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.
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
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.
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.
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.
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.
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)
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.
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.
132 }
133}
string reason
The reason why the session creation failed.
Definition Session.ice:26
The exception that is thrown when an attempt to create a new session fails.
Definition Session.ice:24
idempotent void add(Ice::IdentitySeq additions)
Adds a sequence of Ice identities to this set of constraints.
Manages a set of object identity constraints on a Session.
Definition Session.ice:62
Session * create(SSLInfo info, SessionControl *control)
Creates a new session object.
Represents an application-provided factory for session objects.
Definition Session.ice:123
StringSet * adapterIds()
Gets a proxy to the object that manages the allowable adapter identities for objects for this session...
idempotent int getSessionTimeout()
Gets the session timeout.
StringSet * categories()
Gets a proxy to the object that manages the allowable categories for object identities for this sessi...
IdentitySet * identities()
Gets a proxy to the object that manages the allowable object identities for this session.
Represents a router-provided object that allows an application-provided session manager to configure ...
Definition Session.ice:83
void destroy()
Destroys the associated session.
Session * create(string userId, SessionControl *control)
Creates a new session object.
Represents an application-provided factory for session objects.
Definition Session.ice:108
Represents a session between a client application and the Glacier2 router.
Definition Session.ice:35
void destroy()
Destroys this session.
idempotent void add(Ice::StringSeq additions)
Adds a sequence of strings to this set of constraints.
Manages a set of constraints on a Session.
Definition Session.ice:43
Communicate through firewalls and across NATs.
sequence< Identity > IdentitySeq
A sequence of identities.
Definition Identity.ice:35
sequence< string > StringSeq
A sequence of strings.
Represents information gathered from an incoming SSL connection and used for authentication and autho...
Definition SSLInfo.ice:21