Record Class ProcessOutput

java.lang.Object
java.lang.Record
org.jpos.log.evt.ProcessOutput
Record Components:
name - the name of the process, serialized as an XML attribute with the local name "name"
stdout - the standard output of the process, serialized as XML text
stderr - the standard error of the process, included in JSON output only if non-null

public record ProcessOutput(String name, String stdout, String stderr) extends Record
Record representing the output of a process, encapsulating the process name, standard output, and optionally standard error.

This record makes use of Jackson annotations to control the serialization and deserialization process. The name field is serialized as an attribute with the local name "name". The stdout field is serialized as XML text. The stderr field is included in the JSON output only if it is non-null.

  • Constructor Details

    • ProcessOutput

      public ProcessOutput(String name, String stdout, String stderr)
      Creates an instance of a ProcessOutput record class.
      Parameters:
      name - the value for the name record component
      stdout - the value for the stdout record component
      stderr - the value for the stderr record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • stdout

      public String stdout()
      Returns the value of the stdout record component.
      Returns:
      the value of the stdout record component
    • stderr

      public String stderr()
      Returns the value of the stderr record component.
      Returns:
      the value of the stderr record component