|
From: <tre...@us...> - 2007-06-28 21:33:20
|
Revision: 200
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=200&view=rev
Author: trevorolio
Date: 2007-06-28 14:33:22 -0700 (Thu, 28 Jun 2007)
Log Message:
-----------
Tweaked the space client to allow longer for initial authentication and to give a reasonable error message when it times out.
Modified Paths:
--------------
spaces/trunk/src/com/ogoglio/client/SpaceClient.java
spaces/trunk/src/com/ogoglio/viewer/applet/AppletTestWindow.java
Modified: spaces/trunk/src/com/ogoglio/client/SpaceClient.java
===================================================================
--- spaces/trunk/src/com/ogoglio/client/SpaceClient.java 2007-06-27 19:35:10 UTC (rev 199)
+++ spaces/trunk/src/com/ogoglio/client/SpaceClient.java 2007-06-28 21:33:22 UTC (rev 200)
@@ -75,7 +75,6 @@
ArgumentUtils.assertNotNull(serviceURI);
ArgumentUtils.assertNotNull(authCookie);
webClient = new WebAPIClient(spaceURI, serviceURI, authCookie);
-
ArgumentUtils.assertNotNull(listener);
this.listener = listener;
@@ -91,7 +90,7 @@
messenger.authenticate(authCookie);
long startWait = System.currentTimeMillis();
- while (System.currentTimeMillis() < startWait + 10000 && messenger.authStatus == messenger.INIT_STATUS) {
+ while (System.currentTimeMillis() < startWait + 45000 && messenger.authStatus == messenger.INIT_STATUS) {
try {
Thread.sleep(100);
} catch (Exception e) {
@@ -99,8 +98,14 @@
}
if (messenger.authStatus != messenger.SUCCESS_STATUS) {
+ System.out.println("No auth, message " + messenger.errorMessage);
+
messenger.cleanup();
- throw new IOException(messenger.errorMessage);
+ if(messenger.errorMessage == null) {
+ throw new IOException("This viewer could not get the go-ahead.");
+ } else {
+ throw new IOException(messenger.errorMessage);
+ }
}
UserDocument[] userDocs = webClient.getUserDocuments();
Modified: spaces/trunk/src/com/ogoglio/viewer/applet/AppletTestWindow.java
===================================================================
--- spaces/trunk/src/com/ogoglio/viewer/applet/AppletTestWindow.java 2007-06-27 19:35:10 UTC (rev 199)
+++ spaces/trunk/src/com/ogoglio/viewer/applet/AppletTestWindow.java 2007-06-28 21:33:22 UTC (rev 200)
@@ -26,8 +26,6 @@
import java.net.URL;
import java.util.HashMap;
-import com.ogoglio.persist.TestPersistTasks;
-
public class AppletTestWindow extends Frame {
//static Dimension appDimension = new Dimension(640, 500);
@@ -38,7 +36,7 @@
EnvironmentStub clientStub1 = null;
- String host = "marcel.local:8080";
+ String host = "localhost:8080";
String serviceURI = "http://" + host + "/og/";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|