package com.zy.core.dispatch; import lombok.Data; @Data public class StationCommandDispatchResult { private final boolean accepted; private final String reason; private final int queueDepth; private final String source; private final String scene; public static StationCommandDispatchResult accepted(String reason, int queueDepth, String source, String scene) { return new StationCommandDispatchResult(true, reason, queueDepth, source, scene); } public static StationCommandDispatchResult rejected(String reason, int queueDepth, String source, String scene) { return new StationCommandDispatchResult(false, reason, queueDepth, source, scene); } }