The command response format

Overview

Most FlexRAID commands execute asynchronously.

When the execution of a command is successful (CommandResponse.success == true), the CommandStatus will be set and CommandStatus.referenceCode can be used to query for the status of the running task (See the status command). Additionally, CommandResponse.commandMessages will contain information about the successful operation.
If the execution was unsuccessful, the CommandStatus will be null and either or both of the CommandResponse.commandMessages and/or CommandResponse.serverMessages will have details on the reason for the failure.

For commands that execute synchronously, CommandStatus will always be null.

public class InfoRequestCommandResponse<T> extends CommandResponse {
private static final long serialVersionUID = -5122259168559136386L;
//Each command using InfoRequestCommandResponse will describe what T is
private final List<T> infos = new LinkedList<T>();// Can be any list implementation
}

public class ProgressSnapshot implements Serializable {
private static final long serialVersionUID = -8165836709194695854L;
private final List<ProgressInfo> infos = new ArrayList<ProgressInfo>();
private long startTime; //time in millisecond since Epoch - 0 if not yet started
private long endTime; //time in millisecond since Epoch - 0 if not yet ended
}

public final class ProgressInfo implements Serializable {
private static final long serialVersionUID = -197743983667971791L;
private String name; //The name of the operation segment
private long totalCount; //The total process count
private boolean ioProgress; //Whether this segment involves reading/writting data to/from disks
private long startTime; //Time in millisecond sinde Epoch - 0 if not yet started
private long pausedTime; //Duration in millisecond - 0 if never paused
private long refTime; //Time in millisecond sinde Epoch - when this progress snapshot was taken
private long remainingCount; //The remaining count to process
private boolean ended; //Whether this segment has completed
private List<ProgressInfo> subProgresses; //Operation segments can have sub-segments
//For instance, the copyData command for instance tracks the number of files and folders being processed
//along with the throughput information for the data being copied.
}