Skip to content

Commit e00c35b

Browse files
committed
format
1 parent 7a6bb44 commit e00c35b

File tree

1 file changed

+22
-30
lines changed

1 file changed

+22
-30
lines changed

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

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ public interface WebSocket {
5252
Future<Void> sendTextFrame(String payload);
5353

5454
/**
55-
* Allows sending a text frame with fragmentation or extension bits.
56-
* When using fragmentation, the next fragments must be sent with sendContinuationFrame.
55+
* Allows sending a text frame with fragmentation or extension bits. When using fragmentation, the next fragments must be sent with sendContinuationFrame.
5756
*
5857
* @param payload a text fragment.
5958
* @param finalFragment flag indicating whether or not this is the final fragment
@@ -63,16 +62,15 @@ public interface WebSocket {
6362
Future<Void> sendTextFrame(String payload, boolean finalFragment, int rsv);
6463

6564
/**
66-
* Allows sending a text frame with fragmentation or extension bits.
67-
* When using fragmentation, the next fragments must be sent with sendContinuationFrame.
65+
* Allows sending a text frame with fragmentation or extension bits. When using fragmentation, the next fragments must be sent with sendContinuationFrame.
6866
*
6967
* @param payload a ByteBuf fragment.
7068
* @param finalFragment flag indicating whether or not this is the final fragment
7169
* @param rsv extension bits, 0 otherwise
7270
* @return a future that will be completed once the frame will be actually written on the wire
7371
*/
7472
Future<Void> sendTextFrame(ByteBuf payload, boolean finalFragment, int rsv);
75-
73+
7674
/**
7775
* Send a full binary frame.
7876
*
@@ -82,8 +80,7 @@ public interface WebSocket {
8280
Future<Void> sendBinaryFrame(byte[] payload);
8381

8482
/**
85-
* Allows sending a binary frame with fragmentation or extension bits.
86-
* When using fragmentation, the next fragments must be sent with sendContinuationFrame.
83+
* Allows sending a binary frame with fragmentation or extension bits. When using fragmentation, the next fragments must be sent with sendContinuationFrame.
8784
*
8885
* @param payload a binary payload
8986
* @param finalFragment flag indicating whether or not this is the last fragment
@@ -93,8 +90,7 @@ public interface WebSocket {
9390
Future<Void> sendBinaryFrame(byte[] payload, boolean finalFragment, int rsv);
9491

9592
/**
96-
* Allows sending a binary frame with fragmentation or extension bits.
97-
* When using fragmentation, the next fragments must be sent with sendContinuationFrame.
93+
* Allows sending a binary frame with fragmentation or extension bits. When using fragmentation, the next fragments must be sent with sendContinuationFrame.
9894
*
9995
* @param payload a ByteBuf payload
10096
* @param finalFragment flag indicating whether or not this is the last fragment
@@ -104,53 +100,50 @@ public interface WebSocket {
104100
Future<Void> sendBinaryFrame(ByteBuf payload, boolean finalFragment, int rsv);
105101

106102
/**
107-
* Send a text continuation frame.
108-
* The last fragment must have finalFragment set to true.
103+
* Send a text continuation frame. The last fragment must have finalFragment set to true.
109104
*
110105
* @param payload the text fragment
111106
* @param finalFragment flag indicating whether or not this is the last fragment
112107
* @param rsv extension bits, 0 otherwise
113108
* @return a future that will be completed once the frame will be actually written on the wire
114109
*/
115110
Future<Void> sendContinuationFrame(String payload, boolean finalFragment, int rsv);
116-
111+
117112
/**
118-
* Send a binary continuation frame.
119-
* The last fragment must have finalFragment set to true.
113+
* Send a binary continuation frame. The last fragment must have finalFragment set to true.
120114
*
121115
* @param payload the binary fragment
122116
* @param finalFragment flag indicating whether or not this is the last fragment
123117
* @param rsv extension bits, 0 otherwise
124118
* @return a future that will be completed once the frame will be actually written on the wire
125119
*/
126120
Future<Void> sendContinuationFrame(byte[] payload, boolean finalFragment, int rsv);
127-
121+
128122
/**
129-
* Send a continuation frame (those are actually untyped as counterpart must have memorized first fragmented frame type).
130-
* The last fragment must have finalFragment set to true.
123+
* Send a continuation frame (those are actually untyped as counterpart must have memorized first fragmented frame type). The last fragment must have finalFragment set to true.
131124
*
132125
* @param payload a ByteBuf fragment
133126
* @param finalFragment flag indicating whether or not this is the last fragment
134127
* @param rsv extension bits, 0 otherwise
135128
* @return a future that will be completed once the frame will be actually written on the wire
136129
*/
137130
Future<Void> sendContinuationFrame(ByteBuf payload, boolean finalFragment, int rsv);
138-
131+
139132
/**
140133
* Send a empty ping frame
141134
*
142135
* @return a future that will be completed once the frame will be actually written on the wire
143136
*/
144137
Future<Void> sendPingFrame();
145-
138+
146139
/**
147140
* Send a ping frame with a byte array payload (limited to 125 bytes or less).
148141
*
149142
* @param payload the payload.
150143
* @return a future that will be completed once the frame will be actually written on the wire
151144
*/
152145
Future<Void> sendPingFrame(byte[] payload);
153-
146+
154147
/**
155148
* Send a ping frame with a ByteBuf payload (limited to 125 bytes or less).
156149
*
@@ -165,7 +158,7 @@ public interface WebSocket {
165158
* @return a future that will be completed once the frame will be actually written on the wire
166159
*/
167160
Future<Void> sendPongFrame();
168-
161+
169162
/**
170163
* Send a pong frame with a byte array payload (limited to 125 bytes or less).
171164
*
@@ -181,14 +174,14 @@ public interface WebSocket {
181174
* @return a future that will be completed once the frame will be actually written on the wire
182175
*/
183176
Future<Void> sendPongFrame(ByteBuf payload);
184-
177+
185178
/**
186179
* Send a empty close frame.
187180
*
188181
* @return a future that will be completed once the frame will be actually written on the wire
189182
*/
190183
Future<Void> sendCloseFrame();
191-
184+
192185
/**
193186
* Send a empty close frame.
194187
*
@@ -197,8 +190,12 @@ public interface WebSocket {
197190
* @return a future that will be completed once the frame will be actually written on the wire
198191
*/
199192
Future<Void> sendCloseFrame(int statusCode, String reasonText);
200-
201-
193+
194+
/**
195+
* @return <code>true</code> if the WebSocket is open/connected.
196+
*/
197+
boolean isOpen();
198+
202199
/**
203200
* Add a {@link WebSocketListener}
204201
*
@@ -214,9 +211,4 @@ public interface WebSocket {
214211
* @return this
215212
*/
216213
WebSocket removeWebSocketListener(WebSocketListener l);
217-
218-
/**
219-
* @return <code>true</code> if the WebSocket is open/connected.
220-
*/
221-
boolean isOpen();
222214
}

0 commit comments

Comments
 (0)