@@ -112,64 +112,6 @@ public void stop() throws IOException {
112112
113113 }
114114
115- /**
116- * Sends <var>text</var> to all currently connected WebSocket clients.
117- *
118- * @param text
119- * The String to send across the network.
120- * @throws InterruptedException
121- * When socket related I/O errors occur.
122- */
123- public void sendToAll ( String text ) throws InterruptedException {
124- for ( WebSocket c : this .connections ) {
125- c .send ( text );
126- }
127- }
128-
129- /**
130- * Sends <var>text</var> to all currently connected WebSocket clients,
131- * except for the specified <var>connection</var>.
132- *
133- * @param connection
134- * The {@link WebSocket} connection to ignore.
135- * @param text
136- * The String to send to every connection except <var>connection</var>.
137- * @throws IOException
138- * When socket related I/O errors occur.
139- */
140- public void sendToAllExcept ( WebSocket connection , String text ) throws InterruptedException {
141- if ( connection == null ) {
142- throw new NullPointerException ( "'connection' cannot be null" );
143- }
144-
145- for ( WebSocket c : this .connections ) {
146- if ( !connection .equals ( c ) ) {
147- c .send ( text );
148- }
149- }
150- }
151-
152- /**
153- * Sends <var>text</var> to all currently connected WebSocket clients,
154- * except for those found in the Set <var>connections</var>.
155- *
156- * @param connections
157- * @param text
158- * @throws IOException
159- * When socket related I/O errors occur.
160- */
161- public void sendToAllExcept ( Set <WebSocket > connections , String text ) throws InterruptedException {
162- if ( connections == null ) {
163- throw new NullPointerException ( "'connections' cannot be null" );
164- }
165-
166- for ( WebSocket c : this .connections ) {
167- if ( !connections .contains ( c ) ) {
168- c .send ( text );
169- }
170- }
171- }
172-
173115 /**
174116 * Returns a WebSocket[] of currently connected clients.
175117 *
0 commit comments