Record Class ExecuteSystemCommandResponse.SystemCommandResponse
java.lang.Object
java.lang.Record
io.openems.edge.core.host.jsonrpc.ExecuteSystemCommandResponse.SystemCommandResponse
- Enclosing class:
ExecuteSystemCommandResponse
public static record ExecuteSystemCommandResponse.SystemCommandResponse(String[] stdout, String[] stderr, int exitcode)
extends Record
Holds common parameters for a response to a
ExecuteSystemCommandRequest.SystemCommand
.-
Constructor Summary
ConstructorDescriptionSystemCommandResponse
(String[] stdout, String[] stderr, int exitcode) Creates an instance of aSystemCommandResponse
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.int
exitcode()
Returns the value of theexitcode
record component.final int
hashCode()
Returns a hash code value for this object.String[]
stderr()
Returns the value of thestderr
record component.String[]
stdout()
Returns the value of thestdout
record component.com.google.gson.JsonObject
Convert toJsonObject
.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
SystemCommandResponse
Creates an instance of aSystemCommandResponse
record class.- Parameters:
stdout
- the value for thestdout
record componentstderr
- the value for thestderr
record componentexitcode
- the value for theexitcode
record component
-
-
Method Details
-
toJsonObject
public com.google.gson.JsonObject toJsonObject()Convert toJsonObject
.- Returns:
- a
JsonObject
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
stdout
Returns the value of thestdout
record component.- Returns:
- the value of the
stdout
record component
-
stderr
Returns the value of thestderr
record component.- Returns:
- the value of the
stderr
record component
-
exitcode
public int exitcode()Returns the value of theexitcode
record component.- Returns:
- the value of the
exitcode
record component
-