Skip to content

Commit 7fa598b

Browse files
committed
Add a test for AsyncHttpClient#91
1 parent ec09eca commit 7fa598b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved.
3+
*
4+
* This program is licensed to you under the Apache License Version 2.0,
5+
* and you may not use this file except in compliance with the Apache License Version 2.0.
6+
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.
7+
*
8+
* Unless required by applicable law or agreed to in writing,
9+
* software distributed under the Apache License Version 2.0 is distributed on an
10+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
12+
*/
13+
package com.ning.http.client.websocket;
14+
15+
/**
16+
* Extend the normal close listener with one that support the WebSocket's code and reason.
17+
* @See http://tools.ietf.org/html/rfc6455#section-5.5.1
18+
*
19+
* NOTE: This listener is currently only supported by the NettyAsyncHttpProvider
20+
*
21+
*/
22+
public interface WebSocketCloseCodeReasonListener {
23+
24+
/**
25+
* Invoked when the {@link WebSocket} is close.
26+
*
27+
* @param websocket
28+
*/
29+
void onClose(WebSocket websocket, int code, String reason);
30+
}

0 commit comments

Comments
 (0)