1 28 29 package org.objectweb.openccm.task; 30 31 import java.io.File ; 33 import java.util.Map ; 34 35 43 public class IR3Start 44 extends LauncherApplication 45 { 46 52 53 private String ior_file_; 54 55 56 private boolean no_mappings_; 57 58 64 69 public IR3Start(Map project_properties) 70 { 71 super(project_properties); 73 74 ior_file_ = project_properties_.getProperty("OpenCCM_CONFIG_DIR") + "/IR3.IOR"; 76 no_mappings_ = false; 77 } 78 79 85 91 94 public void 95 configure() 96 { 97 String idl_dir = null; 98 99 addProperty( "OpenCCM_CONFIG_DIR", 100 project_properties_.getProperty("OpenCCM_CONFIG_DIR") ); 101 addArgument("--ior-file"); 102 addArgument(ior_file_); 103 if (no_mappings_) 104 { 105 addArgument("--no-mappings"); 106 } 107 108 setXmlFile( project_properties_.getProperty("OpenCCM_HOMEDIR") + "/xml/launcher/IR3Server.xml" ); 109 } 110 111 115 public void 116 post_exec() 117 { 118 File file = new File (ior_file_); 120 while ( (!file.exists()) ) 121 { 122 try { Thread.sleep(1000); } catch(Exception exc) { } 124 } 125 } 126 127 130 public void 131 stop() 132 { 133 super.stop(); 134 135 File file = new File (ior_file_); 137 file.delete(); 138 } 139 140 145 public void 146 setIorfile(String ior_file) 147 { 148 this.ior_file_ = ior_file; 149 } 150 151 156 public void 157 setNo_mappings(boolean b) 158 { 159 this.no_mappings_ = b; 160 } 161 } 162 | Popular Tags |