@@ -361,7 +361,7 @@ public void run() {
361361 channel .configureBlocking ( false );
362362 Socket socket = channel .socket ();
363363 socket .setTcpNoDelay ( tcpNoDelay );
364- WebSocketImpl w = wsf .createWebSocket ( this , drafts , socket );
364+ WebSocketImpl w = wsf .createWebSocket ( this , drafts );
365365 w .key = channel .register ( selector , SelectionKey .OP_READ , w );
366366 try {
367367 w .channel = wsf .wrapChannel ( channel , w .key );
@@ -538,22 +538,6 @@ private void handleFatal( WebSocket conn, Exception e ) {
538538 }
539539 }
540540
541- /**
542- * Gets the XML string that should be returned if a client requests a Flash
543- * security policy.
544- *
545- * The default implementation allows access from all remote domains, but
546- * only on the port that this WebSocketServer is listening on.
547- *
548- * This is specifically implemented for gitime's WebSocket client for Flash:
549- * http://github.com/gimite/web-socket-js
550- *
551- * @return An XML String that comforms to Flash's security policy. You MUST
552- * not include the null char at the end, it is appended automatically.
553- */
554- protected String getFlashSecurityPolicy () {
555- return "<cross-domain-policy><allow-access-from domain=\" *\" to-ports=\" " + getPort () + "\" /></cross-domain-policy>" ;
556- }
557541
558542 @ Override
559543 public final void onWebsocketMessage ( WebSocket conn , String message ) {
@@ -836,16 +820,10 @@ public void run() {
836820 */
837821 public interface WebSocketServerFactory extends WebSocketFactory {
838822 @ Override
839- public WebSocketImpl createWebSocket ( WebSocketAdapter a , Draft d , Socket s );
823+ WebSocketImpl createWebSocket ( WebSocketAdapter a , Draft d );
840824
841- /**
842- * Create a new Websocket with the provided listener, drafts and socket
843- * @param a The Listener for the WebsocketImpl
844- * @param drafts The drafts which should be used
845- * @param s The socket which should be used
846- * @return A WebsocketImpl
847- */
848- public WebSocketImpl createWebSocket ( WebSocketAdapter a , List <Draft > drafts , Socket s );
825+ @ Override
826+ WebSocketImpl createWebSocket ( WebSocketAdapter a , List <Draft > drafts );
849827
850828 /**
851829 * Allows to wrap the Socketchannel( key.channel() ) to insert a protocol layer( like ssl or proxy authentication) beyond the ws layer.
@@ -855,11 +833,11 @@ public interface WebSocketServerFactory extends WebSocketFactory {
855833 * @return The channel on which the read and write operations will be performed.<br>
856834 * @throws IOException may be thrown while writing on the channel
857835 */
858- public ByteChannel wrapChannel ( SocketChannel channel , SelectionKey key ) throws IOException ;
836+ ByteChannel wrapChannel ( SocketChannel channel , SelectionKey key ) throws IOException ;
859837
860838 /**
861839 * Allows to shutdown the websocket factory for a clean shutdown
862840 */
863- public void close ();
841+ void close ();
864842 }
865843}
0 commit comments