Skip to content

Commit 8f54019

Browse files
committed
remove dead code
1 parent 26d39cb commit 8f54019

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

client/src/main/java/org/asynchttpclient/ws/WebSocketUpgradeHandler.java

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ public void bufferFrame(Runnable bufferedFrame) {
4848
bufferedFrames.add(bufferedFrame);
4949
}
5050

51-
/**
52-
* {@inheritDoc}
53-
*/
5451
@Override
5552
public final void onThrowable(Throwable t) {
5653
onFailure(t);
@@ -62,37 +59,24 @@ public boolean touchSuccess() {
6259
return prev;
6360
}
6461

65-
/**
66-
* {@inheritDoc}
67-
*/
6862
@Override
6963
public final State onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception {
7064
return State.CONTINUE;
7165
}
7266

73-
/**
74-
* {@inheritDoc}
75-
*/
7667
@Override
7768
public final State onStatusReceived(HttpResponseStatus responseStatus) throws Exception {
7869
status = responseStatus.getStatusCode();
7970
return status == SWITCHING_PROTOCOLS ? State.UPGRADE : State.ABORT;
8071
}
8172

82-
/**
83-
* {@inheritDoc}
84-
*/
8573
@Override
8674
public final State onHeadersReceived(HttpResponseHeaders headers) throws Exception {
8775
return State.CONTINUE;
8876
}
8977

90-
/**
91-
* {@inheritDoc}
92-
*/
9378
@Override
9479
public final WebSocket onCompleted() throws Exception {
95-
9680
if (status != SWITCHING_PROTOCOLS) {
9781
IllegalStateException e = new IllegalStateException("Invalid Status Code " + status);
9882
for (WebSocketListener listener : listeners) {
@@ -104,9 +88,6 @@ public final WebSocket onCompleted() throws Exception {
10488
return webSocket;
10589
}
10690

107-
/**
108-
* {@inheritDoc}
109-
*/
11091
@Override
11192
public final void onSuccess(WebSocket webSocket) {
11293
this.webSocket = webSocket;
@@ -123,9 +104,6 @@ public final void onSuccess(WebSocket webSocket) {
123104
ok.set(true);
124105
}
125106

126-
/**
127-
* {@inheritDoc}
128-
*/
129107
@Override
130108
public final void onFailure(Throwable t) {
131109
for (WebSocketListener listener : listeners) {
@@ -136,22 +114,6 @@ public final void onFailure(Throwable t) {
136114
}
137115
}
138116

139-
public final void onClose(WebSocket webSocket, int status, String reasonPhrase) {
140-
// Connect failure
141-
if (this.webSocket == null)
142-
this.webSocket = webSocket;
143-
144-
for (WebSocketListener listener : listeners) {
145-
if (webSocket != null) {
146-
webSocket.addWebSocketListener(listener);
147-
}
148-
listener.onClose(webSocket);
149-
if (listener instanceof WebSocketCloseCodeReasonListener) {
150-
WebSocketCloseCodeReasonListener.class.cast(listener).onClose(webSocket, status, reasonPhrase);
151-
}
152-
}
153-
}
154-
155117
/**
156118
* Build a {@link WebSocketUpgradeHandler}
157119
*/

0 commit comments

Comments
 (0)