Skip to content

Commit 3bd0f51

Browse files
committed
Removal of deprecated drafts
Removed Draft_10, Draft_17, Draft_75, Draft_76
1 parent 8e4deaf commit 3bd0f51

File tree

8 files changed

+295
-1030
lines changed

8 files changed

+295
-1030
lines changed

src/main/java/org/java_websocket/WebSocket.java

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ public interface WebSocket {
3838
/**
3939
* Enum which represents the states a websocket may be in
4040
*/
41-
public enum Role {
41+
enum Role {
4242
CLIENT, SERVER
4343
}
4444

4545
/**
4646
* Enum which represents the state a websocket may be in
4747
*/
48-
public enum READYSTATE {
48+
enum READYSTATE {
4949
NOT_YET_CONNECTED, CONNECTING, OPEN, CLOSING, CLOSED
5050
}
5151

@@ -54,48 +54,48 @@ public enum READYSTATE {
5454
* constructor is used, DEFAULT_PORT will be the port the WebSocketServer
5555
* is binded to. Note that ports under 1024 usually require root permissions.
5656
*/
57-
public static final int DEFAULT_PORT = 80;
57+
int DEFAULT_PORT = 80;
5858

5959
/**
6060
* The default wss port of WebSockets, as defined in the spec. If the nullary
6161
* constructor is used, DEFAULT_WSS_PORT will be the port the WebSocketServer
6262
* is binded to. Note that ports under 1024 usually require root permissions.
6363
*/
64-
public static final int DEFAULT_WSS_PORT = 443;
64+
int DEFAULT_WSS_PORT = 443;
6565

6666
/**
6767
* sends the closing handshake.
6868
* may be send in response to an other handshake.
6969
* @param code the closing code
7070
* @param message the closing message
7171
*/
72-
public void close( int code, String message );
72+
void close( int code, String message );
7373

7474
/**
7575
* sends the closing handshake.
7676
* may be send in response to an other handshake.
7777
* @param code the closing code
7878
*/
79-
public void close( int code );
79+
void close( int code );
8080

8181
/** Convenience function which behaves like close(CloseFrame.NORMAL) */
82-
public void close();
82+
void close();
8383

8484
/**
8585
* This will close the connection immediately without a proper close handshake.
8686
* The code and the message therefore won't be transfered over the wire also they will be forwarded to onClose/onWebsocketClose.
8787
* @param code the closing code
8888
* @param message the closing message
8989
**/
90-
public abstract void closeConnection( int code, String message );
90+
void closeConnection( int code, String message );
9191

9292
/**
9393
* Send Text data to the other end.
9494
*
9595
* @param text the text data to send
9696
* @throws NotYetConnectedException websocket is not yet connected
9797
*/
98-
public abstract void send( String text ) throws NotYetConnectedException;
98+
void send( String text ) throws NotYetConnectedException;
9999

100100
/**
101101
* Send Binary data (plain bytes) to the other end.
@@ -104,7 +104,7 @@ public enum READYSTATE {
104104
* @throws IllegalArgumentException the data is null
105105
* @throws NotYetConnectedException websocket is not yet connected
106106
*/
107-
public abstract void send( ByteBuffer bytes ) throws IllegalArgumentException , NotYetConnectedException;
107+
void send( ByteBuffer bytes ) throws IllegalArgumentException , NotYetConnectedException;
108108

109109
/**
110110
* Send Binary data (plain bytes) to the other end.
@@ -113,7 +113,7 @@ public enum READYSTATE {
113113
* @throws IllegalArgumentException the data is null
114114
* @throws NotYetConnectedException websocket is not yet connected
115115
*/
116-
public abstract void send( byte[] bytes ) throws IllegalArgumentException , NotYetConnectedException;
116+
void send( byte[] bytes ) throws IllegalArgumentException , NotYetConnectedException;
117117

118118
/**
119119
* Send a frame to the other end
@@ -146,64 +146,64 @@ public enum READYSTATE {
146146
* @param fin
147147
* true means the current frame is the last in the sequence.
148148
**/
149-
public abstract void sendFragmentedFrame( Opcode op, ByteBuffer buffer, boolean fin );
149+
void sendFragmentedFrame( Opcode op, ByteBuffer buffer, boolean fin );
150150

151151
/**
152152
* Checks if the websocket has buffered data
153153
* @return has the websocket buffered data
154154
*/
155-
public abstract boolean hasBufferedData();
155+
boolean hasBufferedData();
156156

157157
/**
158158
* Returns the address of the endpoint this socket is connected to, or{@code null} if it is unconnected.
159159
*
160160
* @return never returns null
161161
*/
162-
public abstract InetSocketAddress getRemoteSocketAddress();
162+
InetSocketAddress getRemoteSocketAddress();
163163

164164
/**
165165
* Returns the address of the endpoint this socket is bound to.
166166
*
167167
* @return never returns null
168168
*/
169-
public abstract InetSocketAddress getLocalSocketAddress();
169+
InetSocketAddress getLocalSocketAddress();
170170

171171
/**
172172
* Is the websocket in the state CONNECTING
173173
* @return state equals READYSTATE.CONNECTING
174174
*/
175-
public abstract boolean isConnecting();
175+
boolean isConnecting();
176176

177177
/**
178178
* Is the websocket in the state OPEN
179179
* @return state equals READYSTATE.OPEN
180180
*/
181-
public abstract boolean isOpen();
181+
boolean isOpen();
182182

183183
/**
184184
* Is the websocket in the state CLOSING
185185
* @return state equals READYSTATE.CLOSING
186186
*/
187-
public abstract boolean isClosing();
187+
boolean isClosing();
188188

189189
/**
190190
* Returns true when no further frames may be submitted<br>
191191
* This happens before the socket connection is closed.
192192
* @return true when no further frames may be submitted
193193
*/
194-
public abstract boolean isFlushAndClose();
194+
boolean isFlushAndClose();
195195

196196
/**
197197
* Is the websocket in the state CLOSED
198198
* @return state equals READYSTATE.CLOSED
199199
*/
200-
public abstract boolean isClosed();
200+
boolean isClosed();
201201

202202
/**
203203
* Getter for the draft
204204
* @return the used draft
205205
*/
206-
public abstract Draft getDraft();
206+
Draft getDraft();
207207

208208
/**
209209
* Retrieve the WebSocket 'readyState'.
@@ -212,12 +212,12 @@ public enum READYSTATE {
212212
*
213213
* @return Returns '0 = CONNECTING', '1 = OPEN', '2 = CLOSING' or '3 = CLOSED'
214214
*/
215-
public abstract READYSTATE getReadyState();
215+
READYSTATE getReadyState();
216216

217217
/**
218218
* Returns the HTTP Request-URI as defined by http://tools.ietf.org/html/rfc2616#section-5.1.2<br>
219219
* If the opening handshake has not yet happened it will return null.
220220
* @return Returns the decoded path component of this URI.
221221
**/
222-
public abstract String getResourceDescriptor();
222+
String getResourceDescriptor();
223223
}

0 commit comments

Comments
 (0)