1 16 package com.sun.slamd.example; 17 18 19 20 import com.sun.slamd.client.*; 21 import com.sun.slamd.job.*; 22 import com.sun.slamd.parameter.*; 23 import com.sun.slamd.stat.*; 24 25 26 27 34 public class NullJobClass 35 extends JobClass 36 { 37 43 public NullJobClass() 44 { 45 super(); 46 } 47 48 49 50 55 public String getJobName() 56 { 57 return "Null Job"; 58 } 59 60 61 62 67 public String getJobDescription() 68 { 69 return "This job can be used to insert a delay between other jobs."; 70 } 71 72 73 74 80 public String getJobCategoryName() 81 { 82 return "Utility"; 83 } 84 85 86 87 94 public ParameterList getParameterStubs() 95 { 96 return new ParameterList(); 97 } 98 99 100 101 123 public StatTracker[] getStatTrackerStubs(String clientID, String threadID, 124 int collectionInterval) 125 { 126 return new StatTracker[0]; 127 } 128 129 130 131 136 public StatTracker[] getStatTrackers() 137 { 138 return new StatTracker[0]; 139 } 140 141 142 143 159 public void initializeThread(String clientID, String threadID, 160 int collectionInterval, ParameterList parameters) 161 throws UnableToRunException 162 { 163 } 165 166 167 168 171 public void runJob() 172 { 173 while (! shouldStop()) 175 { 176 try 177 { 178 Thread.sleep(100); 179 } catch (InterruptedException ie) {} 180 } 181 } 182 } 183 184 | Popular Tags |