Ice
3.9
Slice API Reference
Toggle main menu visibility
Loading...
Searching...
No Matches
IceGrid
Session.ice
1
// Copyright (c) ZeroC, Inc.
2
3
#pragma once
4
5
[[
"cpp:dll-export:ICEGRID_API"
]]
6
[[
"cpp:doxygen:include:IceGrid/IceGrid.h"
]]
7
[[
"cpp:header-ext:h"
]]
8
9
[[
"cpp:include:IceGrid/Config.h"
]]
10
11
[[
"js:module:@zeroc/ice"
]]
12
13
#include "Exception.ice"
14
#include "Glacier2/Session.ice"
15
16
[
"java:identifier:com.zeroc.IceGrid"
]
17
module
IceGrid
18
{
19
interface
Registry;
// For doc-comments.
20
21
/// Represents a session object used by IceGrid clients to allocate and release objects. Client sessions are created
22
/// either via the {@link Registry} object or via the registry client {@link Glacier2::SessionManager} object.
23
interface
Session
extends
Glacier2::Session
24
{
25
/// Keeps the session alive.
26
[
"deprecated:As of Ice 3.8, there is no need to call this operation, and its implementation does nothing."
]
27
idempotent
void
keepAlive
();
28
29
/// Allocates an object.
30
/// @param id The identity of the object to allocate.
31
/// @return A proxy to the allocated object. This proxy is never null.
32
/// @throws ObjectNotRegisteredException Thrown when an object with the given identity is not registered with
33
/// the registry.
34
/// @throws AllocationException Thrown when the allocation fails.
35
/// @see #setAllocationTimeout
36
/// @see #releaseObject
37
Object
*
allocateObjectById
(
Ice::Identity
id
)
38
throws
ObjectNotRegisteredException
,
AllocationException
;
39
40
/// Allocates an object with the given type.
41
/// @param type The type of the object.
42
/// @return A proxy to the allocated object. This proxy is never null.
43
/// @throws AllocationException Thrown when the allocation fails.
44
/// @see #setAllocationTimeout
45
/// @see #releaseObject
46
Object
*
allocateObjectByType
(
string
type)
47
throws
AllocationException
;
48
49
/// Releases an object that was allocated using {@link allocateObjectById} or {@link allocateObjectByType}.
50
/// @param id The identity of the object to release.
51
/// @throws ObjectNotRegisteredException Thrown when an object with the given identity is not registered with
52
/// the registry.
53
/// @throws AllocationException Thrown when the object can't be released. This can happen when the object is not
54
/// allocatable or is not allocated by this session.
55
void
releaseObject
(
Ice::Identity
id
)
56
throws
ObjectNotRegisteredException
,
AllocationException
;
57
58
/// Sets the allocation timeout. When no object is immediately available for an allocation request, the
59
/// implementation of {@link allocateObjectById} and {@link allocateObjectByType} waits for the duration of
60
/// this @p timeout.
61
/// @param timeout The timeout in milliseconds.
62
idempotent
void
setAllocationTimeout
(
int
timeout);
63
}
64
}
IceGrid::AllocationException
The exception that is thrown when the allocation of an object failed.
Definition
Exception.ice:75
IceGrid::ObjectNotRegisteredException
The exception that is thrown when a well-known object is not registered.
Definition
Exception.ice:94
Glacier2::Session
Represents a session between a client application and the Glacier2 router.
Definition
Session.ice:35
IceGrid::Session::releaseObject
void releaseObject(Ice::Identity id)
Releases an object that was allocated using allocateObjectById or allocateObjectByType.
IceGrid::Session::allocateObjectById
Object * allocateObjectById(Ice::Identity id)
Allocates an object.
IceGrid::Session::allocateObjectByType
Object * allocateObjectByType(string type)
Allocates an object with the given type.
IceGrid::Session::setAllocationTimeout
idempotent void setAllocationTimeout(int timeout)
Sets the allocation timeout.
IceGrid::Session
Represents a session object used by IceGrid clients to allocate and release objects.
Definition
Session.ice:24
IceGrid::Session::keepAlive
idempotent void keepAlive()
Keeps the session alive.
IceGrid
Deploy and manage Ice servers.
Definition
Admin.ice:21
Ice::Identity
Represents the identity of an Ice object.
Definition
Identity.ice:29
Generated by
1.17.0