Changeset 18987 for gli/trunk/src/org/greenstone/gatherer/Gatherer.java
- Timestamp:
- 2009-04-15T18:27:33+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/Gatherer.java
r18644 r18987 325 325 } 326 326 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) { 328 328 LocalLibraryServer.start(gsdl_path, local_library_path); 329 329 } … … 795 795 apps.add(app); 796 796 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 } 797 814 } 798 815 … … 1060 1077 private String command = null; 1061 1078 private String[] commands = null; 1079 1080 private String ID = null; 1081 1062 1082 /** Constructor. 1063 1083 * @param command The initial command <strong>String</strong>. … … 1070 1090 this.commands = commands; 1071 1091 } 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 1072 1102 /** We start the child process inside a new thread so it doesn't block the rest of Gatherer. 1073 1103 * @see java.lang.Exception
Note:
See TracChangeset
for help on using the changeset viewer.