blob: a8200f574c9c00258aa7e4bb2c8beeb665b22ab7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
// **********************************************************************
//
// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
#ifndef GLACIER2_SESSION_ICE
#define GLACIER2_SESSION_ICE
module Glacier2
{
/**
*
* This exception is raised if an attempt to create a new session
* failed.
*
* @see Router::createSession
* @see SessionManager::createSession
*
**/
exception CannotCreateSessionException
{
/**
*
* The reason why session creation has failed.
*
**/
string reason;
};
/**
*
* A client-visible session object, which is tied to the lifecycle of
* a [Router].
*
* @see Router
* @see SessionManager
*
**/
interface Session
{
/**
*
* Destroy the session. This is called automatically when the
* [Router] is destroyed.
*
**/
void destroy();
};
/**
*
* The session manager, which is responsible for managing [Session]
* objects. New session objects are created by the [Router] object
* calling on an application-provided session manager. If no session
* manager is provided by the application, no client-visible sessions
* are passed to the client.
*
* @see Router
* @see Session
*
**/
interface SessionManager
{
/**
*
* Create a new session.
*
* @param userId The user id for the session.
*
* @return A proxy to the newly created session.
*
* @throws CannotCreateSessionException Raised if the session
* cannot be created.
*
**/
Session* create(string userId)
throws CannotCreateSessionException;
};
};
#endif
|