Ignore:
Timestamp:
2009-04-15T18:27:33+12:00 (15 years ago)
Author:
ak19
Message:

Updated several files such that the Server2 code in server.jar can interact with GLI code so that the local GS2 server for Linux works the same way as the GS2 Local Library Server on windows.

File:
1 edited

Legend:

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

    r18644 r18987  
    325325        }
    326326        else { // local greenstone: Start up the local library server, if that's what we want
    327         if (Utility.isWindows() && local_library_path != null && !GS3) {
     327        if (local_library_path != null && !GS3) {
    328328            LocalLibraryServer.start(gsdl_path, local_library_path);
    329329        }
     
    795795    apps.add(app);
    796796    app.start();
     797    }
     798
     799    static public void spawnApplication(String command, String ID)
     800    {
     801    ExternalApplication app = new ExternalApplication(command, ID);
     802    apps.add(app);
     803    app.start();
     804    }
     805
     806    static public void terminateApplication(String ID) {
     807    for(int i = 0; i < apps.size(); i++) {
     808        ExternalApplication app = (ExternalApplication)apps.get(i);
     809        if(app.getID() != null && app.getID().equals(ID)) {
     810        app.stopExternalApplication();
     811        apps.remove(app);
     812        }
     813    }
    797814    }
    798815
     
    10601077    private String command = null;
    10611078    private String[] commands = null;
     1079
     1080    private String ID = null;
     1081
    10621082    /** Constructor.
    10631083     * @param command The initial command <strong>String</strong>.
     
    10701090        this.commands = commands;
    10711091    }
     1092
     1093    public ExternalApplication(String command, String ID) {
     1094        this.command = command;
     1095        this.ID = ID;
     1096    }
     1097   
     1098    public String getID() {
     1099        return ID;
     1100    }
     1101
    10721102    /** We start the child process inside a new thread so it doesn't block the rest of Gatherer.
    10731103     * @see java.lang.Exception
Note: See TracChangeset for help on using the changeset viewer.