#
Junjie
2 天以前 90402710d962aa357062ecb94649e0f277c1dfb3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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);
    }
}