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: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"]
17module 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
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 ["amd"] Object* allocateObjectByType(string type)
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.
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}
The exception that is thrown when the allocation of an object failed.
The exception that is thrown when a well-known object is not registered.
Definition Exception.ice:69
Represents a session between a client application and the Glacier2 router.
Definition Session.ice:35
void releaseObject(Ice::Identity id)
Releases an object that was allocated using allocateObjectById or allocateObjectByType.
Object * allocateObjectById(Ice::Identity id)
Allocates an object.
Object * allocateObjectByType(string type)
Allocates an object with the given type.
idempotent void setAllocationTimeout(int timeout)
Sets the allocation timeout.
Represents a session object used by IceGrid clients to allocate and release objects.
Definition Session.ice:24
idempotent void keepAlive()
Keeps the session alive.
Deploy and manage Ice servers.
Definition Admin.ice:21
Represents the identity of an Ice object.
Definition Identity.ice:26