Ignore:
Timestamp:
2009-04-23T19:04:51+12:00 (15 years ago)
Author:
ak19
Message:

The length of time to wait for the server to startup or stop is stored ina variable (better to keep this length somewhat similar to how long greenstone3's src code server/Server2.java waits).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/greenstone/LocalLibraryServer.java

    r19203 r19243  
    4343public class LocalLibraryServer
    4444{
     45    static final private int WAITING_TIME = 60; // number of seconds to wait for the server to start and stop
     46
    4547    static final private String ADD_COMMAND = "?a=config&cmd=add-collection&c=";
    4648    static final private String RELEASE_COMMAND = "?a=config&cmd=release-collection&c=";
     
    258260        attempt_count++;
    259261
    260         // After waiting a minute ask the user whether they want to wait another minute
    261         if (attempt_count == 60) {
    262         int try_again = JOptionPane.showConfirmDialog(Gatherer.g_man, Dictionary.get("Server.QuitTimeOut"), Dictionary.get("General.Warning"), JOptionPane.YES_NO_OPTION);
     262        // After waiting for the specified time, ask the user whether they want to wait for that long again
     263        if (attempt_count == WAITING_TIME) {
     264        int try_again = JOptionPane.showConfirmDialog(Gatherer.g_man, Dictionary.get("Server.QuitTimeOut", Integer.toString(WAITING_TIME)),
     265                                  Dictionary.get("General.Warning"), JOptionPane.YES_NO_OPTION);
    263266        if (try_again == JOptionPane.NO_OPTION) {
    264267            return;
     
    310313        attempt_count++;
    311314
    312         // After waiting a minute ask the user whether they want to wait another minute
    313         if (attempt_count == 60) {
    314         int try_again = JOptionPane.showConfirmDialog(Gatherer.g_man, Dictionary.get("Server.QuitTimeOut"), Dictionary.get("General.Warning"), JOptionPane.YES_NO_OPTION);
     315        // After waiting for the specified time, ask the user whether they want to wait for that long again
     316        if (attempt_count == WAITING_TIME) {
     317        int try_again = JOptionPane.showConfirmDialog(Gatherer.g_man, Dictionary.get("Server.StartUpTimeOut", Integer.toString(WAITING_TIME)),
     318                                  Dictionary.get("General.Warning"), JOptionPane.YES_NO_OPTION);
    315319        if (try_again == JOptionPane.NO_OPTION) {
    316320            return;
Note: See TracChangeset for help on using the changeset viewer.