1 package org.metricshub.winrm;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 public class WindowsRemoteCommandResult {
24
25 private final String stdout;
26 private final String stderr;
27 private final float executionTime;
28 private final int statusCode;
29
30
31
32
33
34
35
36
37
38 public WindowsRemoteCommandResult(
39 final String stdout,
40 final String stderr,
41 final float executionTime,
42 final int statusCode
43 ) {
44 this.stdout = stdout;
45 this.stderr = stderr;
46 this.executionTime = executionTime;
47 this.statusCode = statusCode;
48 }
49
50
51
52
53
54 public String getStdout() {
55 return stdout;
56 }
57
58
59
60
61
62 public String getStderr() {
63 return stderr;
64 }
65
66
67
68
69
70 public float getExecutionTime() {
71 return executionTime;
72 }
73
74
75
76
77
78 public int getStatusCode() {
79 return statusCode;
80 }
81
82 @Override
83 public String toString() {
84 return new StringBuilder()
85 .append("WindowsRemoteCommandResult:\nstdout:\n")
86 .append(stdout)
87 .append("\nstderr:\n")
88 .append(stderr)
89 .append("\nexecutionTime = ")
90 .append(executionTime)
91 .append("\nstatusCode = ")
92 .append(statusCode)
93 .toString();
94 }
95 }