class StatusStreamMessage extends WebSocketMessage {

  private static final byte ERROR_CHANNEL_STREAM_ID = 3;

  public StatusStreamMessage(final int exitCode) {
    super(0L, getBodyBytes(ERROR_CHANNEL_STREAM_ID, getStatusBody(exitCode)), true, true);
  }

  private static String getStatusBody(int exitCode) {<FILL_FUNCTION_BODY>}
}

    final Status status = new StatusBuilder() //
        .withStatus(exitCode == 0 ? "Success" : "Failure")
        .withReason(exitCode == 0 ? "ExitCode" : "NonZeroExitCode")
        .withNewDetails()
        .addNewCause()
        .withReason("ExitCode")
        .withMessage(String.valueOf(exitCode))
        .endCause()
        .endDetails()
        .build();
    return Serialization.asJson(status);
  
<methods>public void <init>(java.lang.String) ,public void <init>(byte[]) ,public void <init>(java.lang.String, boolean) ,public void <init>(byte[], boolean) ,public void <init>(java.lang.Long, java.lang.String, boolean) ,public void <init>(java.lang.Long, byte[], boolean) ,public void <init>(java.lang.Long, java.lang.String, boolean, boolean) ,public void <init>(java.lang.Long, byte[], boolean, boolean) ,public java.lang.String getBody() ,public byte[] getBytes() ,public java.lang.Long getDelay() ,public boolean isBinary() ,public boolean isToBeRemoved() <variables>private final non-sealed boolean binary,private final non-sealed byte[] body,private final non-sealed java.lang.Long delay,private final non-sealed boolean toBeRemoved