1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.util.channel.model;
17
18 import org.kuali.common.util.Assert;
19
20 public final class CommandResult {
21
22 public CommandResult(byte[] command, int exitValue, long start) {
23 this.stop = System.currentTimeMillis();
24 Assert.isTrue(stop >= start);
25 Assert.noNulls(command);
26 Assert.noNegatives(start);
27 this.command = command;
28 this.exitValue = exitValue;
29 this.start = start;
30 this.elapsed = stop - start;
31 }
32
33 private final byte[] command;
34 private final int exitValue;
35 private final long start;
36 private final long stop;
37 private final long elapsed;
38
39 public byte[] getCommand() {
40 return command;
41 }
42
43 public int getExitValue() {
44 return exitValue;
45 }
46
47 public long getStart() {
48 return start;
49 }
50
51 public long getStop() {
52 return stop;
53 }
54
55 public long getElapsed() {
56 return elapsed;
57 }
58
59 }