1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package io.netty5.handler.codec.http.websocketx;
17
18 import io.netty5.handler.codec.CorruptedFrameException;
19 import io.netty5.handler.codec.DecoderException;
20
21
22
23
24
25 public final class CorruptedWebSocketFrameException extends CorruptedFrameException {
26
27 private static final long serialVersionUID = 3918055132492988338L;
28
29 private final WebSocketCloseStatus closeStatus;
30
31
32
33
34 public CorruptedWebSocketFrameException() {
35 this(WebSocketCloseStatus.PROTOCOL_ERROR, null, null);
36 }
37
38
39
40
41 public CorruptedWebSocketFrameException(WebSocketCloseStatus status, String message, Throwable cause) {
42 super(message == null ? status.reasonText() : message, cause);
43 closeStatus = status;
44 }
45
46
47
48
49 public CorruptedWebSocketFrameException(WebSocketCloseStatus status, String message) {
50 this(status, message, null);
51 }
52
53
54
55
56 public CorruptedWebSocketFrameException(WebSocketCloseStatus status, Throwable cause) {
57 this(status, null, cause);
58 }
59
60 public WebSocketCloseStatus closeStatus() {
61 return closeStatus;
62 }
63
64 }