diff options
author | Bernard Normier <bernard@zeroc.com> | 2005-06-25 16:48:42 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2005-06-25 16:48:42 +0000 |
commit | 68c4c2ad068c5647bef41659bb16811374d1fedc (patch) | |
tree | fee0b1ea8e3d0f32c53172e8a7e591eba7342db6 /java/src/IceGrid/SessionKeeper.java | |
parent | Added minimal client to CE build (diff) | |
download | ice-68c4c2ad068c5647bef41659bb16811374d1fedc.tar.bz2 ice-68c4c2ad068c5647bef41659bb16811374d1fedc.tar.xz ice-68c4c2ad068c5647bef41659bb16811374d1fedc.zip |
Fixed build
Diffstat (limited to 'java/src/IceGrid/SessionKeeper.java')
-rwxr-xr-x | java/src/IceGrid/SessionKeeper.java | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/java/src/IceGrid/SessionKeeper.java b/java/src/IceGrid/SessionKeeper.java index cdf56ec811c..736766113c0 100755 --- a/java/src/IceGrid/SessionKeeper.java +++ b/java/src/IceGrid/SessionKeeper.java @@ -256,19 +256,7 @@ class SessionKeeper {
public void run()
{
- destroyObservers();
- _model.lostSession();
-
- JOptionPane.showMessageDialog(
- _parent,
- "Failed to contact the IceGrid registry: " + e.toString(),
- "Session lost",
- JOptionPane.ERROR_MESSAGE);
-
- //
- // Offer New Connection dialog
- //
- createSession(false);
+ sessionLost("Failed to contact the IceGrid registry: " + e.toString());
}
});
}
@@ -366,12 +354,11 @@ class SessionKeeper //
// Discard session
//
- _model.lostSession();
destroyObservers();
releaseSession();
+ _model.sessionLost();
}
-
Cursor oldCursor = parent.getCursor();
try
@@ -479,6 +466,28 @@ class SessionKeeper return true;
}
+
+ //
+ // Runs in UI thread
+ //
+ void sessionLost(String message)
+ {
+ destroyObservers();
+ releaseSession();
+ _model.sessionLost();
+
+ JOptionPane.showMessageDialog(
+ _parent,
+ message,
+ "Session lost",
+ JOptionPane.ERROR_MESSAGE);
+
+ //
+ // Offer new Connection dialog
+ //
+ createSession(false);
+ }
+
//
// Runs in UI thread
//
@@ -529,7 +538,7 @@ class SessionKeeper _nodeObserverIdentity.category = "nodeObserver";
RegistryObserverI registryObserverServant = new RegistryObserverI(
- _model);
+ this, _model);
RegistryObserverPrx registryObserver =
RegistryObserverPrxHelper.uncheckedCast(
|