diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-09-04 19:42:16 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-09-04 19:42:16 +0000 |
commit | e4eba4680b2058554bfc74d2983ba06f0b8c379e (patch) | |
tree | 0c0c09209cc0786df6546eb605abd7a0b6adade3 /java/src/IceGridGUI/AdapterObserverI.java | |
parent | Improved observers, refactored topic manager and initialization Added (diff) | |
download | ice-e4eba4680b2058554bfc74d2983ba06f0b8c379e.tar.bz2 ice-e4eba4680b2058554bfc74d2983ba06f0b8c379e.tar.xz ice-e4eba4680b2058554bfc74d2983ba06f0b8c379e.zip |
Added application/adapter/object observers
Diffstat (limited to 'java/src/IceGridGUI/AdapterObserverI.java')
-rw-r--r-- | java/src/IceGridGUI/AdapterObserverI.java | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/java/src/IceGridGUI/AdapterObserverI.java b/java/src/IceGridGUI/AdapterObserverI.java new file mode 100644 index 00000000000..85c429eea37 --- /dev/null +++ b/java/src/IceGridGUI/AdapterObserverI.java @@ -0,0 +1,67 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 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. +// +// ********************************************************************** +package IceGridGUI; + +import javax.swing.SwingUtilities; +import IceGrid.*; + +class AdapterObserverI extends _AdapterObserverDisp +{ + + AdapterObserverI(Coordinator coordinator) + { + _coordinator = coordinator; + } + + public synchronized void adapterInit(final AdapterInfo[] adapters, Ice.Current current) + { + SwingUtilities.invokeLater(new Runnable() + { + public void run() + { + _coordinator.adapterInit(adapters); + } + }); + } + + public void adapterAdded(final AdapterInfo info, Ice.Current current) + { + SwingUtilities.invokeLater(new Runnable() + { + public void run() + { + _coordinator.adapterAdded(info); + } + }); + } + + public void adapterUpdated(final AdapterInfo info, Ice.Current current) + { + SwingUtilities.invokeLater(new Runnable() + { + public void run() + { + _coordinator.adapterUpdated(info); + } + }); + } + + public void adapterRemoved(final String id, Ice.Current current) + { + SwingUtilities.invokeLater(new Runnable() + { + public void run() + { + _coordinator.adapterRemoved(id); + } + }); + } + + private final Coordinator _coordinator; +}; |