diff options
author | Jose <jose@zeroc.com> | 2015-12-16 12:37:46 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2015-12-16 12:37:46 +0100 |
commit | d29abfae967e39035ae7f3939f02ab9f50103aeb (patch) | |
tree | a4d0e04504c4c196b82c2cab4773461e29beda5c | |
parent | C++11 mapping Glacier2Lib updates (diff) | |
download | ice-d29abfae967e39035ae7f3939f02ab9f50103aeb.tar.bz2 ice-d29abfae967e39035ae7f3939f02ab9f50103aeb.tar.xz ice-d29abfae967e39035ae7f3939f02ab9f50103aeb.zip |
Avoid forward declarations with IceGridLib
-rw-r--r-- | cpp/src/IceGrid/Internal.ice | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/QueryI.h | 2 | ||||
-rw-r--r-- | cpp/src/IceGridLib/Makefile | 3 | ||||
-rw-r--r-- | cpp/src/IceStorm/Service.cpp | 3 | ||||
-rw-r--r-- | cpp/src/Makefile | 5 | ||||
-rw-r--r-- | cpp/src/Makefile.mak | 5 | ||||
-rw-r--r-- | csharp/src/IceGrid/Makefile | 3 | ||||
-rw-r--r-- | csharp/src/IceGrid/Makefile.mak | 3 | ||||
-rw-r--r-- | js/src/IceGrid/sources.json | 3 | ||||
-rw-r--r-- | python/python/Makefile | 3 | ||||
-rw-r--r-- | python/python/Makefile.mak | 3 | ||||
-rw-r--r-- | ruby/ruby/IceGrid.rb | 3 | ||||
-rw-r--r-- | ruby/ruby/Makefile | 3 | ||||
-rw-r--r-- | slice/IceGrid/Admin.ice | 374 | ||||
-rw-r--r-- | slice/IceGrid/Locator.ice | 57 | ||||
-rw-r--r-- | slice/IceGrid/Observer.ice | 395 | ||||
-rw-r--r-- | slice/IceGrid/Query.ice | 131 | ||||
-rw-r--r-- | slice/IceGrid/Registry.ice | 132 |
18 files changed, 511 insertions, 619 deletions
diff --git a/cpp/src/IceGrid/Internal.ice b/cpp/src/IceGrid/Internal.ice index 3d7392efab9..424482156ed 100644 --- a/cpp/src/IceGrid/Internal.ice +++ b/cpp/src/IceGrid/Internal.ice @@ -14,12 +14,10 @@ #include <Ice/Identity.ice> #include <Ice/BuiltinSequences.ice> #include <Ice/ProcessF.ice> -#include <Ice/Locator.ice> #include <Ice/Properties.ice> #include <Glacier2/Session.ice> #include <IceGrid/Admin.ice> -#include <IceGrid/Observer.ice> #include <IceGrid/Registry.ice> module IceGrid diff --git a/cpp/src/IceGrid/QueryI.h b/cpp/src/IceGrid/QueryI.h index 482322f08a0..c969ecdf64d 100644 --- a/cpp/src/IceGrid/QueryI.h +++ b/cpp/src/IceGrid/QueryI.h @@ -10,7 +10,7 @@ #ifndef ICE_GRID_QUERY_I_H #define ICE_GRID_QUERY_I_H -#include <IceGrid/Query.h> +#include <IceGrid/Registry.h> #include <Ice/CommunicatorF.h> namespace IceGrid diff --git a/cpp/src/IceGridLib/Makefile b/cpp/src/IceGridLib/Makefile index 05410c99580..e41af83e175 100644 --- a/cpp/src/IceGridLib/Makefile +++ b/cpp/src/IceGridLib/Makefile @@ -20,10 +20,7 @@ SLICE_OBJS = Admin.o \ Descriptor.o \ Exception.o \ FileParser.o \ - Locator.o \ - Observer.o \ PluginFacade.o \ - Query.o \ Registry.o \ Session.o \ UserAccountMapper.o diff --git a/cpp/src/IceStorm/Service.cpp b/cpp/src/IceStorm/Service.cpp index 572c236694d..fe69458e883 100644 --- a/cpp/src/IceStorm/Service.cpp +++ b/cpp/src/IceStorm/Service.cpp @@ -26,8 +26,7 @@ #include <IceStorm/NodeI.h> #include <IceStorm/TransientTopicI.h> -#include <IceGrid/Locator.h> -#include <IceGrid/Query.h> +#include <IceGrid/Registry.h> using namespace std; using namespace Ice; diff --git a/cpp/src/Makefile b/cpp/src/Makefile index 12c87196c3f..4c9ac214b89 100644 --- a/cpp/src/Makefile +++ b/cpp/src/Makefile @@ -17,7 +17,10 @@ ifeq ($(CPP11_MAPPING),yes) slice2cpp \ Ice \ IceSSL \ - IceDiscovery + IceDiscovery \ + Glacier2Lib \ + IceStormLib \ + IceGridLib else ifneq ($(findstring MINGW,$(UNAME)),) diff --git a/cpp/src/Makefile.mak b/cpp/src/Makefile.mak index 3dea3e0f4e7..5e0296b48b3 100644 --- a/cpp/src/Makefile.mak +++ b/cpp/src/Makefile.mak @@ -24,7 +24,10 @@ SUBDIRS = IceUtil \ slice2cpp \ Ice \ IceSSL \ - IceDiscovery + IceDiscovery \ + Glacier2Lib \ + IceStormLib \ + IceGridLib !elseif "$(CPP_COMPILER)" == "VC100" SUBDIRS = IceUtil \ Slice \ diff --git a/csharp/src/IceGrid/Makefile b/csharp/src/IceGrid/Makefile index ec40bcd8cb7..694c60a2411 100644 --- a/csharp/src/IceGrid/Makefile +++ b/csharp/src/IceGrid/Makefile @@ -20,9 +20,6 @@ SLICE_SRCS = $(SDIR)/Admin.ice \ $(SDIR)/Descriptor.ice \ $(SDIR)/Exception.ice \ $(SDIR)/FileParser.ice \ - $(SDIR)/Locator.ice \ - $(SDIR)/Observer.ice \ - $(SDIR)/Query.ice \ $(SDIR)/Registry.ice \ $(SDIR)/Session.ice \ $(SDIR)/UserAccountMapper.ice diff --git a/csharp/src/IceGrid/Makefile.mak b/csharp/src/IceGrid/Makefile.mak index f2664073131..826290aacd9 100644 --- a/csharp/src/IceGrid/Makefile.mak +++ b/csharp/src/IceGrid/Makefile.mak @@ -20,9 +20,6 @@ GEN_SRCS = $(GDIR)\Admin.cs \ $(GDIR)\Descriptor.cs \ $(GDIR)\Exception.cs \ $(GDIR)\FileParser.cs \ - $(GDIR)\Locator.cs \ - $(GDIR)\Observer.cs \ - $(GDIR)\Query.cs \ $(GDIR)\Registry.cs \ $(GDIR)\Session.cs \ $(GDIR)\UserAccountMapper.cs diff --git a/js/src/IceGrid/sources.json b/js/src/IceGrid/sources.json index 3ccaca61e66..a6b8622dea2 100644 --- a/js/src/IceGrid/sources.json +++ b/js/src/IceGrid/sources.json @@ -7,9 +7,6 @@ "IceGrid/Descriptor.ice", "IceGrid/Exception.ice", "IceGrid/FileParser.ice", - "IceGrid/Locator.ice", - "IceGrid/Observer.ice", - "IceGrid/Query.ice", "IceGrid/Registry.ice", "IceGrid/Session.ice", "IceGrid/UserAccountMapper.ice"], diff --git a/python/python/Makefile b/python/python/Makefile index 9fafeab7ada..14dbc844807 100644 --- a/python/python/Makefile +++ b/python/python/Makefile @@ -71,9 +71,6 @@ ICEGRID_SRCS = IceGrid_Admin_ice.py \ IceGrid_Descriptor_ice.py \ IceGrid_Exception_ice.py \ IceGrid_FileParser_ice.py \ - IceGrid_Locator_ice.py \ - IceGrid_Observer_ice.py \ - IceGrid_Query_ice.py \ IceGrid_Registry_ice.py \ IceGrid_Session_ice.py \ IceGrid_UserAccountMapper_ice.py diff --git a/python/python/Makefile.mak b/python/python/Makefile.mak index 26d8dec616b..d4dc538e630 100644 --- a/python/python/Makefile.mak +++ b/python/python/Makefile.mak @@ -81,9 +81,6 @@ ICEGRID_SLICES = IceGrid\Admin.ice \ IceGrid\Descriptor.ice \ IceGrid\Exception.ice \ IceGrid\FileParser.ice \ - IceGrid\Locator.ice \ - IceGrid\Observer.ice \ - IceGrid\Query.ice \ IceGrid\Registry.ice \ IceGrid\Session.ice \ IceGrid\UserAccountMapper.ice \ diff --git a/ruby/ruby/IceGrid.rb b/ruby/ruby/IceGrid.rb index 365954cbf77..9eca41985c8 100644 --- a/ruby/ruby/IceGrid.rb +++ b/ruby/ruby/IceGrid.rb @@ -10,8 +10,5 @@ require 'IceGrid/Admin.rb' require 'IceGrid/Descriptor.rb' require 'IceGrid/FileParser.rb' -require 'IceGrid/Locator.rb' -require 'IceGrid/Observer.rb' -require 'IceGrid/Query.rb' require 'IceGrid/Registry.rb' require 'IceGrid/UserAccountMapper.rb' diff --git a/ruby/ruby/Makefile b/ruby/ruby/Makefile index 3fe9e57c8d5..b940a402332 100644 --- a/ruby/ruby/Makefile +++ b/ruby/ruby/Makefile @@ -79,9 +79,6 @@ ICEGRID_SRCS = IceGrid/Admin.rb \ IceGrid/Descriptor.rb \ IceGrid/Exception.rb \ IceGrid/FileParser.rb \ - IceGrid/Locator.rb \ - IceGrid/Observer.rb \ - IceGrid/Query.rb \ IceGrid/Registry.rb \ IceGrid/Session.rb \ IceGrid/UserAccountMapper.rb diff --git a/slice/IceGrid/Admin.ice b/slice/IceGrid/Admin.ice index 9c2a794218b..07b9d62195c 100644 --- a/slice/IceGrid/Admin.ice +++ b/slice/IceGrid/Admin.ice @@ -1242,11 +1242,375 @@ interface FileIterator void destroy(); }; -interface RegistryObserver; -interface NodeObserver; -interface ApplicationObserver; -interface AdapterObserver; -interface ObjectObserver; +/** + * + * Dynamic information about the state of a server. + * + **/ +struct ServerDynamicInfo +{ + /** + * + * The id of the server. + * + **/ + string id; + + /** + * + * The state of the server. + * + **/ + ServerState state; + + /** + * + * The process id of the server. + * + **/ + int pid; + + /** + * + * Indicates whether the server is enabled. + * + **/ + bool enabled; +}; + +/** + * + * A sequence of server dynamic information structures. + * + **/ +["java:type:java.util.LinkedList<ServerDynamicInfo>"] sequence<ServerDynamicInfo> ServerDynamicInfoSeq; + +/** + * + * Dynamic information about the state of an adapter. + * + **/ +struct AdapterDynamicInfo +{ + /** + * + * The id of the adapter. + * + **/ + string id; + + /** + * + * The direct proxy containing the adapter endpoints. + * + **/ + Object* proxy; +}; + +/** + * + * A sequence of adapter dynamic information structures. + * + **/ +["java:type:java.util.LinkedList<AdapterDynamicInfo>"] sequence<AdapterDynamicInfo> AdapterDynamicInfoSeq; + +/** + * + * Dynamic information about the state of a node. + * + **/ +struct NodeDynamicInfo +{ + /** + * + * Some static information about the node. + * + **/ + NodeInfo info; + + /** + * + * The dynamic information of the servers deployed on this node. + * + **/ + ServerDynamicInfoSeq servers; + + /** + * + * The dynamic information of the adapters deployed on this node. + * + **/ + AdapterDynamicInfoSeq adapters; +}; + +/** + * + * This interface allows applications to monitor changes the state + * of the registry. + * + **/ +interface RegistryObserver +{ + /** + * + * The <tt>registryInit</tt> operation is called after registration of + * an observer to indicate the state of the registries. + * + * @param registries The current state of the registries. + * + **/ + void registryInit(RegistryInfoSeq registries); + + /** + * + * The <tt>nodeUp</tt> operation is called to notify an observer that a node + * came up. + * + * @param node The node state. + * + **/ + void registryUp(RegistryInfo node); + + /** + * + * The <tt>nodeDown</tt> operation is called to notify an observer that a node + * went down. + * + * @param name The node name. + * + **/ + void registryDown(string name); +}; + +/** + * + * A sequence of node dynamic information structures. + * + **/ +sequence<NodeDynamicInfo> NodeDynamicInfoSeq; + +/** + * + * The node observer interface. Observers should implement this + * interface to receive information about the state of the IceGrid + * nodes. + * + **/ +interface NodeObserver +{ + /** + * + * The <tt>nodeInit</tt> operation indicates the current state + * of nodes. It is called after the registration of an observer. + * + * @param nodes The current state of the nodes. + * + **/ + void nodeInit(NodeDynamicInfoSeq nodes); + + /** + * + * The <tt>nodeUp</tt> operation is called to notify an observer that a node + * came up. + * + * @param node The node state. + * + **/ + void nodeUp(NodeDynamicInfo node); + + /** + * + * The <tt>nodeDown</tt> operation is called to notify an observer that a node + * went down. + * + * @param name The node name. + * + **/ + void nodeDown(string name); + + /** + * + * The <tt>updateServer</tt> operation is called to notify an observer that + * the state of a server changed. + * + * @param node The node hosting the server. + * + * @param updatedInfo The new server state. + * + **/ + void updateServer(string node, ServerDynamicInfo updatedInfo); + + /** + * + * The <tt>updateAdapter</tt> operation is called to notify an observer that + * the state of an adapter changed. + * + * @param node The node hosting the adapter. + * + * @param updatedInfo The new adapter state. + * + **/ + void updateAdapter(string node, AdapterDynamicInfo updatedInfo); +}; + +/** + * + * The database observer interface. Observers should implement this + * interface to receive information about the state of the IceGrid + * registry database. + * + **/ +interface ApplicationObserver +{ + /** + * + * <tt>applicationInit</tt> is called after the registration + * of an observer to indicate the state of the registry. + * + * @param serial The current serial number of the registry + * database. This serial number allows observers to make sure that + * their internal state is synchronized with the registry. + * + * @param applications The applications currently registered with + * the registry. + * + **/ + void applicationInit(int serial, ApplicationInfoSeq applications); + + /** + * + * The <tt>applicationAdded</tt> operation is called to notify an observer + * that an application was added. + * + * @param serial The new serial number of the registry database. + * + * @param desc The descriptor of the new application. + * + **/ + void applicationAdded(int serial, ApplicationInfo desc); + + /** + * + * The <tt>applicationRemoved</tt> operation is called to notify an observer + * that an application was removed. + * + * @param serial The new serial number of the registry database. + * + * @param name The name of the application that was removed. + * + **/ + void applicationRemoved(int serial, string name); + + /** + * + * The <tt>applicationUpdated</tt> operation is called to notify an observer + * that an application was updated. + * + * @param serial The new serial number of the registry database. + * + * @param desc The descriptor of the update. + * + **/ + void applicationUpdated(int serial, ApplicationUpdateInfo desc); +}; + +/** + * + * This interface allows applications to monitor the state of object + * adapters that are registered with IceGrid. + * + **/ +interface AdapterObserver +{ + /** + * + * <tt>adapterInit</tt> is called after registration of + * an observer to indicate the state of the registry. + * + * @param adpts The adapters that were dynamically registered + * with the registry (not through the deployment mechanism). + * + **/ + void adapterInit(AdapterInfoSeq adpts); + + /** + * + * The <tt>adapterAdded</tt> operation is called to notify an observer when + * a dynamically-registered adapter was added. + * + * @param info The details of the new adapter. + **/ + void adapterAdded(AdapterInfo info); + + /** + * + * The adapterUpdated operation is called to notify an observer when + * a dynamically-registered adapter was updated. + * + * @param info The details of the updated adapter. + * + **/ + void adapterUpdated(AdapterInfo info); + + /** + * + * The adapterRemoved operation is called to notify an observer when + * a dynamically-registered adapter was removed. + * + * @param id The ID of the removed adapter. + * + **/ + void adapterRemoved(string id); +}; + +/** + * + * This interface allows applications to monitor IceGrid well-known objects. + * + **/ +interface ObjectObserver +{ + /** + * + * <tt>objectInit</tt> is called after the registration of + * an observer to indicate the state of the registry. + * + * @param objects The objects registered with the {@link Admin} + * interface (not through the deployment mechanism). + * + **/ + void objectInit(ObjectInfoSeq objects); + + /** + * + * The <tt>objectAdded</tt> operation is called to notify an observer when an + * object was added to the {@link Admin} interface. + * + * @param info The details of the added object. + * + **/ + void objectAdded(ObjectInfo info); + + /** + * + * <tt>objectUpdated</tt> is called to notify an observer when + * an object registered with the {@link Admin} interface was updated. + * + * @param info The details of the updated object. + * + **/ + void objectUpdated(ObjectInfo info); + + /** + * + * <tt>objectRemoved</tt> is called to notify an observer when + * an object registered with the {@link Admin} interface was removed. + * + * @param id The identity of the removed object. + * + **/ + void objectRemoved(Ice::Identity id); +}; /** * diff --git a/slice/IceGrid/Locator.ice b/slice/IceGrid/Locator.ice deleted file mode 100644 index c960e3b5ab0..00000000000 --- a/slice/IceGrid/Locator.ice +++ /dev/null @@ -1,57 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 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. -// -// ********************************************************************** - -#pragma once - -[["cpp:header-ext:h", "objc:header-dir:objc", "js:ice-build"]] -[["cpp:include:IceGrid/Config.h"]] - -#include <Ice/Locator.ice> - -["objc:prefix:ICEGRID"] -module IceGrid -{ - -interface Registry; -interface Query; - -/** - * - * The IceGrid locator interface provides access to the {@link Query} - * and {@link Registry} object of the IceGrid registry. - * - * @see Query - * @see Registry - * - **/ -interface Locator extends Ice::Locator -{ - /** - * - * Get the proxy of the registry object hosted by this IceGrid - * registry. - * - * @return The proxy of the registry object. - * - **/ - ["cpp:const"] idempotent Registry* getLocalRegistry(); - - /** - * - * Get the proxy of the query object hosted by this IceGrid - * registry. - * - * @return The proxy of the query object. - * - **/ - ["cpp:const"] idempotent Query* getLocalQuery(); -}; - -}; - diff --git a/slice/IceGrid/Observer.ice b/slice/IceGrid/Observer.ice deleted file mode 100644 index 63afd4d0078..00000000000 --- a/slice/IceGrid/Observer.ice +++ /dev/null @@ -1,395 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 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. -// -// ********************************************************************** - -#pragma once - -[["cpp:header-ext:h", "objc:header-dir:objc", "js:ice-build"]] -[["cpp:include:IceGrid/Config.h"]] - -#include <Glacier2/Session.ice> -#include <IceGrid/Exception.ice> -#include <IceGrid/Descriptor.ice> -#include <IceGrid/Admin.ice> - -["objc:prefix:ICEGRID"] -module IceGrid -{ - -/** - * - * Dynamic information about the state of a server. - * - **/ -struct ServerDynamicInfo -{ - /** - * - * The id of the server. - * - **/ - string id; - - /** - * - * The state of the server. - * - **/ - ServerState state; - - /** - * - * The process id of the server. - * - **/ - int pid; - - /** - * - * Indicates whether the server is enabled. - * - **/ - bool enabled; -}; - -/** - * - * A sequence of server dynamic information structures. - * - **/ -["java:type:java.util.LinkedList<ServerDynamicInfo>"] sequence<ServerDynamicInfo> ServerDynamicInfoSeq; - -/** - * - * Dynamic information about the state of an adapter. - * - **/ -struct AdapterDynamicInfo -{ - /** - * - * The id of the adapter. - * - **/ - string id; - - /** - * - * The direct proxy containing the adapter endpoints. - * - **/ - Object* proxy; -}; - -/** - * - * A sequence of adapter dynamic information structures. - * - **/ -["java:type:java.util.LinkedList<AdapterDynamicInfo>"] sequence<AdapterDynamicInfo> AdapterDynamicInfoSeq; - -/** - * - * Dynamic information about the state of a node. - * - **/ -struct NodeDynamicInfo -{ - /** - * - * Some static information about the node. - * - **/ - NodeInfo info; - - /** - * - * The dynamic information of the servers deployed on this node. - * - **/ - ServerDynamicInfoSeq servers; - - /** - * - * The dynamic information of the adapters deployed on this node. - * - **/ - AdapterDynamicInfoSeq adapters; -}; - -/** - * - * A sequence of node dynamic information structures. - * - **/ -sequence<NodeDynamicInfo> NodeDynamicInfoSeq; - -/** - * - * The node observer interface. Observers should implement this - * interface to receive information about the state of the IceGrid - * nodes. - * - **/ -interface NodeObserver -{ - /** - * - * The <tt>nodeInit</tt> operation indicates the current state - * of nodes. It is called after the registration of an observer. - * - * @param nodes The current state of the nodes. - * - **/ - void nodeInit(NodeDynamicInfoSeq nodes); - - /** - * - * The <tt>nodeUp</tt> operation is called to notify an observer that a node - * came up. - * - * @param node The node state. - * - **/ - void nodeUp(NodeDynamicInfo node); - - /** - * - * The <tt>nodeDown</tt> operation is called to notify an observer that a node - * went down. - * - * @param name The node name. - * - **/ - void nodeDown(string name); - - /** - * - * The <tt>updateServer</tt> operation is called to notify an observer that - * the state of a server changed. - * - * @param node The node hosting the server. - * - * @param updatedInfo The new server state. - * - **/ - void updateServer(string node, ServerDynamicInfo updatedInfo); - - /** - * - * The <tt>updateAdapter</tt> operation is called to notify an observer that - * the state of an adapter changed. - * - * @param node The node hosting the adapter. - * - * @param updatedInfo The new adapter state. - * - **/ - void updateAdapter(string node, AdapterDynamicInfo updatedInfo); -}; - -/** - * - * The database observer interface. Observers should implement this - * interface to receive information about the state of the IceGrid - * registry database. - * - **/ -interface ApplicationObserver -{ - /** - * - * <tt>applicationInit</tt> is called after the registration - * of an observer to indicate the state of the registry. - * - * @param serial The current serial number of the registry - * database. This serial number allows observers to make sure that - * their internal state is synchronized with the registry. - * - * @param applications The applications currently registered with - * the registry. - * - **/ - void applicationInit(int serial, ApplicationInfoSeq applications); - - /** - * - * The <tt>applicationAdded</tt> operation is called to notify an observer - * that an application was added. - * - * @param serial The new serial number of the registry database. - * - * @param desc The descriptor of the new application. - * - **/ - void applicationAdded(int serial, ApplicationInfo desc); - - /** - * - * The <tt>applicationRemoved</tt> operation is called to notify an observer - * that an application was removed. - * - * @param serial The new serial number of the registry database. - * - * @param name The name of the application that was removed. - * - **/ - void applicationRemoved(int serial, string name); - - /** - * - * The <tt>applicationUpdated</tt> operation is called to notify an observer - * that an application was updated. - * - * @param serial The new serial number of the registry database. - * - * @param desc The descriptor of the update. - * - **/ - void applicationUpdated(int serial, ApplicationUpdateInfo desc); -}; - -/** - * - * This interface allows applications to monitor the state of object - * adapters that are registered with IceGrid. - * - **/ -interface AdapterObserver -{ - /** - * - * <tt>adapterInit</tt> is called after registration of - * an observer to indicate the state of the registry. - * - * @param adpts The adapters that were dynamically registered - * with the registry (not through the deployment mechanism). - * - **/ - void adapterInit(AdapterInfoSeq adpts); - - /** - * - * The <tt>adapterAdded</tt> operation is called to notify an observer when - * a dynamically-registered adapter was added. - * - * @param info The details of the new adapter. - **/ - void adapterAdded(AdapterInfo info); - - /** - * - * The adapterUpdated operation is called to notify an observer when - * a dynamically-registered adapter was updated. - * - * @param info The details of the updated adapter. - * - **/ - void adapterUpdated(AdapterInfo info); - - /** - * - * The adapterRemoved operation is called to notify an observer when - * a dynamically-registered adapter was removed. - * - * @param id The ID of the removed adapter. - * - **/ - void adapterRemoved(string id); -}; - -/** - * - * This interface allows applications to monitor IceGrid well-known objects. - * - **/ -interface ObjectObserver -{ - /** - * - * <tt>objectInit</tt> is called after the registration of - * an observer to indicate the state of the registry. - * - * @param objects The objects registered with the {@link Admin} - * interface (not through the deployment mechanism). - * - **/ - void objectInit(ObjectInfoSeq objects); - - /** - * - * The <tt>objectAdded</tt> operation is called to notify an observer when an - * object was added to the {@link Admin} interface. - * - * @param info The details of the added object. - * - **/ - void objectAdded(ObjectInfo info); - - /** - * - * <tt>objectUpdated</tt> is called to notify an observer when - * an object registered with the {@link Admin} interface was updated. - * - * @param info The details of the updated object. - * - **/ - void objectUpdated(ObjectInfo info); - - /** - * - * <tt>objectRemoved</tt> is called to notify an observer when - * an object registered with the {@link Admin} interface was removed. - * - * @param id The identity of the removed object. - * - **/ - void objectRemoved(Ice::Identity id); -}; - -/** - * - * This interface allows applications to monitor changes the state - * of the registry. - * - **/ -interface RegistryObserver -{ - /** - * - * The <tt>registryInit</tt> operation is called after registration of - * an observer to indicate the state of the registries. - * - * @param registries The current state of the registries. - * - **/ - void registryInit(RegistryInfoSeq registries); - - /** - * - * The <tt>nodeUp</tt> operation is called to notify an observer that a node - * came up. - * - * @param node The node state. - * - **/ - void registryUp(RegistryInfo node); - - /** - * - * The <tt>nodeDown</tt> operation is called to notify an observer that a node - * went down. - * - * @param name The node name. - * - **/ - void registryDown(string name); -}; - -}; - diff --git a/slice/IceGrid/Query.ice b/slice/IceGrid/Query.ice deleted file mode 100644 index 73704f77cfc..00000000000 --- a/slice/IceGrid/Query.ice +++ /dev/null @@ -1,131 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 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. -// -// ********************************************************************** - -#pragma once - -[["cpp:header-ext:h", "objc:header-dir:objc", "js:ice-build"]] -[["cpp:include:IceGrid/Config.h"]] - -#include <Ice/Identity.ice> -#include <Ice/BuiltinSequences.ice> - -#include <IceGrid/Exception.ice> - -/** - * - * IceGrid is a server activation and deployment tool. IceGrid, - * simplifies the complex task of deploying applications in a - * heterogeneous computer network. - * - **/ -["objc:prefix:ICEGRID"] -module IceGrid -{ - -/** - * - * Determines which load sampling interval to use. - * - **/ -enum LoadSample -{ - /** - * Sample every minute. - **/ - LoadSample1, - - /** - * Sample every five minutes. - **/ - LoadSample5, - - /** - * Sample every fifteen minutes. - **/ - LoadSample15 -}; - -/** - * - * The IceGrid query interface. This interface is accessible to - * Ice clients who wish to look up well-known objects. - * - **/ -interface Query -{ - /** - * - * Find a well-known object by identity. - * - * @param id The identity. - * - * @return The proxy or null if no such object has been found. - * - **/ - ["nonmutating", "cpp:const"] idempotent Object* findObjectById(Ice::Identity id); - - /** - * - * Find a well-known object by type. If there are several objects - * registered for the given type, the object is randomly - * selected. - * - * @param type The object type. - * - * @return The proxy or null, if no such object has been found. - * - **/ - ["nonmutating", "cpp:const"] idempotent Object* findObjectByType(string type); - - /** - * - * Find a well-known object by type on the least-loaded node. If - * the registry does not know which node hosts the object - * (for example, because the object was registered with a direct proxy), the - * registry assumes the object is hosted on a node that has a load - * average of 1.0. - * - * @param type The object type. - * - * @param sample The sampling interval. - * - * @return The proxy or null, if no such object has been found. - * - **/ - ["nonmutating", "cpp:const"] idempotent Object* findObjectByTypeOnLeastLoadedNode(string type, LoadSample sample); - - /** - * - * Find all the well-known objects with the given type. - * - * @param type The object type. - * - * @return The proxies or an empty sequence, if no such objects - * have been found. - * - **/ - ["nonmutating", "cpp:const"] idempotent Ice::ObjectProxySeq findAllObjectsByType(string type); - - /** - * - * Find all the object replicas associated with the given - * proxy. If the given proxy is not an indirect proxy from a - * replica group, an empty sequence is returned. - * - * @param proxy The object proxy. - * - * @return The proxies of each object replica or an empty sequence, - * if the given proxy is not from a replica group. - * - **/ - ["cpp:const"] idempotent Ice::ObjectProxySeq findAllReplicas(Object* proxy); -}; - -}; - diff --git a/slice/IceGrid/Registry.ice b/slice/IceGrid/Registry.ice index a980ed12f89..f4340c6c3e2 100644 --- a/slice/IceGrid/Registry.ice +++ b/slice/IceGrid/Registry.ice @@ -15,6 +15,7 @@ #include <IceGrid/Exception.ice> #include <IceGrid/Session.ice> #include <IceGrid/Admin.ice> +#include <Ice/Locator.ice> ["objc:prefix:ICEGRID"] module IceGrid @@ -22,6 +23,105 @@ module IceGrid /** * + * Determines which load sampling interval to use. + * + **/ +enum LoadSample +{ + /** + * Sample every minute. + **/ + LoadSample1, + + /** + * Sample every five minutes. + **/ + LoadSample5, + + /** + * Sample every fifteen minutes. + **/ + LoadSample15 +}; + +/** + * + * The IceGrid query interface. This interface is accessible to + * Ice clients who wish to look up well-known objects. + * + **/ +interface Query +{ + /** + * + * Find a well-known object by identity. + * + * @param id The identity. + * + * @return The proxy or null if no such object has been found. + * + **/ + ["nonmutating", "cpp:const"] idempotent Object* findObjectById(Ice::Identity id); + + /** + * + * Find a well-known object by type. If there are several objects + * registered for the given type, the object is randomly + * selected. + * + * @param type The object type. + * + * @return The proxy or null, if no such object has been found. + * + **/ + ["nonmutating", "cpp:const"] idempotent Object* findObjectByType(string type); + + /** + * + * Find a well-known object by type on the least-loaded node. If + * the registry does not know which node hosts the object + * (for example, because the object was registered with a direct proxy), the + * registry assumes the object is hosted on a node that has a load + * average of 1.0. + * + * @param type The object type. + * + * @param sample The sampling interval. + * + * @return The proxy or null, if no such object has been found. + * + **/ + ["nonmutating", "cpp:const"] idempotent Object* findObjectByTypeOnLeastLoadedNode(string type, LoadSample sample); + + /** + * + * Find all the well-known objects with the given type. + * + * @param type The object type. + * + * @return The proxies or an empty sequence, if no such objects + * have been found. + * + **/ + ["nonmutating", "cpp:const"] idempotent Ice::ObjectProxySeq findAllObjectsByType(string type); + + /** + * + * Find all the object replicas associated with the given + * proxy. If the given proxy is not an indirect proxy from a + * replica group, an empty sequence is returned. + * + * @param proxy The object proxy. + * + * @return The proxies of each object replica or an empty sequence, + * if the given proxy is not from a replica group. + * + **/ + ["cpp:const"] idempotent Ice::ObjectProxySeq findAllReplicas(Object* proxy); +}; + +/** + * * The IceGrid registry allows clients create sessions * directly with the registry. * @@ -135,5 +235,37 @@ interface Registry ["nonmutating", "cpp:const"] idempotent int getACMTimeout(); }; +/** + * + * The IceGrid locator interface provides access to the {@link Query} + * and {@link Registry} object of the IceGrid registry. + * + * @see Query + * @see Registry + * + **/ +interface Locator extends Ice::Locator +{ + /** + * + * Get the proxy of the registry object hosted by this IceGrid + * registry. + * + * @return The proxy of the registry object. + * + **/ + ["cpp:const"] idempotent Registry* getLocalRegistry(); + + /** + * + * Get the proxy of the query object hosted by this IceGrid + * registry. + * + * @return The proxy of the query object. + * + **/ + ["cpp:const"] idempotent Query* getLocalQuery(); +}; + }; |