Ice 3.8
Slice API Reference
Loading...
Searching...
No Matches
Registry.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 "Admin.ice"
14#include "Exception.ice"
15#include "Ice/Locator.ice"
16#include "Session.ice"
17
18/// Deploy and manage Ice servers.
19["java:identifier:com.zeroc.IceGrid"]
20module IceGrid
21{
22 /// Determines which load sampling interval to use.
24 {
25 /// Sample every minute.
26 ["swift:identifier:loadSample1"]
28
29 /// Sample every five minutes.
30 ["swift:identifier:loadSample5"]
32
33 /// Sample every fifteen minutes.
34 ["swift:identifier:loadSample15"]
36 }
37
38 /// Finds well-known Ice objects registered with the IceGrid registry.
39 interface Query
40 {
41 /// Finds a well-known object by identity.
42 /// @param id The identity.
43 /// @return A proxy to the well-known object, or null if no such object is registered.
44 ["cpp:const"]
45 idempotent Object* findObjectById(Ice::Identity id);
46
47 /// Finds a well-known object by type. If there are several objects registered for the given type, the object is
48 /// randomly selected.
49 /// @param type The object type.
50 /// @return A proxy to a well-known object with the specified type, or null if no such object is registered.
51 ["cpp:const"]
52 idempotent Object* findObjectByType(string type);
53
54 /// Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts
55 /// the object (for example, because the object was registered with a direct proxy), the registry assumes the
56 /// object is hosted on a node that has a load average of 1.0.
57 /// @param type The object type.
58 /// @param sample The sampling interval.
59 /// @return A proxy to the well-known object, or null if no such object is registered.
60 ["cpp:const"]
61 idempotent Object* findObjectByTypeOnLeastLoadedNode(string type, LoadSample sample);
62
63 /// Finds all the well-known objects with the given type.
64 /// @param type The object type.
65 /// @return A list of proxies to the well-known objects with the specified type. Can be empty.
66 ["cpp:const"]
68
69 /// Finds all the replicas of a well-known object.
70 /// @param proxy A proxy that identifies the well-known object.
71 /// @return A list of proxies to the replicas of the well-known object specified by @p proxy. Can be empty.
72 ["cpp:const"]
73 idempotent Ice::ObjectProxySeq findAllReplicas(Object* proxy);
74 }
75
76 /// Represents the main entry point into the IceGrid registry service. It provides operations to create sessions
77 /// with the registry.
78 interface Registry
79 {
80 /// Creates a client session.
81 /// @param userId The user ID.
82 /// @param password The password for the given user.
83 /// @return A proxy to the newly created session. This proxy is never null.
84 /// @throws PermissionDeniedException Thrown when authentication or authorization fails.
85 Session* createSession(string userId, string password)
87
88 /// Creates an administrative session.
89 /// @param userId The user ID.
90 /// @param password The password for the given user.
91 /// @return A proxy to the newly created session. This proxy is never null.
92 /// @throws PermissionDeniedException Thrown when authentication or authorization fails.
93 AdminSession* createAdminSession(string userId, string password)
95
96 /// Creates a client session from a secure connection.
97 /// @return A proxy to the newly created session. This proxy is never null.
98 /// @throws PermissionDeniedException Thrown when authentication or authorization fails.
101
102 /// Creates an administrative session from a secure connection.
103 /// @return A proxy to the newly created session. This proxy is never null.
104 /// @throws PermissionDeniedException Thrown when authentication or authorization fails.
107
108 /// Gets the session timeout. An Ice 3.7 or earlier client can use this value to determine how often it needs to
109 /// send heartbeats (using ACM) or call {@link Session#keepAlive} (resp. {@link AdminSession#keepAlive}) to keep
110 /// a session alive in the IceGrid registry.
111 /// @return The session timeout (in seconds).
112 ["cpp:const"]
113 ["deprecated"]
114 idempotent int getSessionTimeout();
115 }
116
117 /// Provides access to the {@link Query} and {@link Registry} objects implemented by the IceGrid registry.
118 interface Locator extends Ice::Locator
119 {
120 /// Gets a proxy to the registry object hosted by this IceGrid registry.
121 /// @return A proxy to the registry object. This proxy is never null.
122 ["cpp:const"]
124
125 /// Gets a proxy to the query object hosted by this IceGrid registry.
126 /// @return A proxy to the query object. This proxy is never null.
127 ["cpp:const"]
128 idempotent Query* getLocalQuery();
129 }
130}
The exception that is thrown when a client is not allowed to create a session.
Represents an administrative session between an admin tool and an IceGrid registry.
Definition Admin.ice:763
idempotent Query * getLocalQuery()
Gets a proxy to the query object hosted by this IceGrid registry.
idempotent Registry * getLocalRegistry()
Gets a proxy to the registry object hosted by this IceGrid registry.
Provides access to the Query and Registry objects implemented by the IceGrid registry.
Definition Registry.ice:119
idempotent Ice::ObjectProxySeq findAllObjectsByType(string type)
Finds all the well-known objects with the given type.
idempotent Object * findObjectById(Ice::Identity id)
Finds a well-known object by identity.
idempotent Object * findObjectByType(string type)
Finds a well-known object by type.
idempotent Object * findObjectByTypeOnLeastLoadedNode(string type, LoadSample sample)
Finds a well-known object by type on the least-loaded node.
idempotent Ice::ObjectProxySeq findAllReplicas(Object *proxy)
Finds all the replicas of a well-known object.
Finds well-known Ice objects registered with the IceGrid registry.
Definition Registry.ice:40
Session * createSession(string userId, string password)
Creates a client session.
AdminSession * createAdminSessionFromSecureConnection()
Creates an administrative session from a secure connection.
idempotent int getSessionTimeout()
Gets the session timeout.
AdminSession * createAdminSession(string userId, string password)
Creates an administrative session.
Session * createSessionFromSecureConnection()
Creates a client session from a secure connection.
Represents the main entry point into the IceGrid registry service.
Definition Registry.ice:79
Represents a session object used by IceGrid clients to allocate and release objects.
Definition Session.ice:24
LoadSample
Determines which load sampling interval to use.
Definition Registry.ice:24
@ LoadSample1
Sample every minute.
Definition Registry.ice:27
@ LoadSample15
Sample every fifteen minutes.
Definition Registry.ice:35
@ LoadSample5
Sample every five minutes.
Definition Registry.ice:31
Deploy and manage Ice servers.
Definition Admin.ice:21
sequence< Object > ObjectProxySeq
A sequence of object proxies.
The Ice RPC framework.
Represents the identity of an Ice object.
Definition Identity.ice:26