1 10 package org.jgap.distr; 11 12 import java.util.*; 13 import org.jgap.util.*; 14 15 21 public class WorkerCommand 22 implements ICommand { 23 24 private final static String CVS_REVISION = "$Revision: 1.4 $"; 25 26 29 private String m_name; 30 31 36 private long m_timeCreated; 37 38 public WorkerCommand(final String a_name) { 39 m_name = a_name; 40 m_timeCreated = getCurrentMilliseconds(); 41 } 42 43 44 public CommandResult execute(final Object a_parameters) 45 throws Exception { 46 47 return null; 48 } 49 50 private static long getCurrentMilliseconds() { 51 Calendar cal = Calendar.getInstance(TimeZone.getDefault()); 52 return cal.getTimeInMillis(); 53 } 54 55 public String getName() { 56 return m_name; 57 } 58 59 public long getAgeMillis() { 60 return getCurrentMilliseconds() - m_timeCreated; 61 } 62 } 63 | Popular Tags |