1 package org.jbpm.graph.log; 2 3 import java.util.Date ; 4 5 import org.jbpm.graph.def.Node; 6 import org.jbpm.logging.log.ProcessLog; 7 8 public class NodeLog extends ProcessLog { 9 10 private static final long serialVersionUID = 1L; 11 12 protected Node node = null; 13 protected Date enter = null; 14 protected Date leave = null; 15 protected long duration = -1; 16 17 19 public NodeLog() { 20 } 21 22 public NodeLog(Node node, Date enter, Date leave) { 23 this.node = node; 24 this.enter = enter; 25 this.leave = leave; 26 this.duration = leave.getTime()-enter.getTime(); 27 } 28 29 31 public String toString() { 32 return "node["+node.getName()+"]"; 33 } 34 public long getDuration() { 35 return duration; 36 } 37 public Date getEnter() { 38 return enter; 39 } 40 public Date getLeave() { 41 return leave; 42 } 43 public Node getNode() { 44 return node; 45 } 46 } 47 | Popular Tags |