com.pusher.java_websocket.server.DefaultWebSocketServerFactory Maven / Gradle / Ivy
package com.pusher.java_websocket.server;
import java.net.Socket;
import java.nio.channels.SelectionKey;
import java.nio.channels.SocketChannel;
import java.util.List;
import com.pusher.java_websocket.WebSocketAdapter;
import com.pusher.java_websocket.WebSocketImpl;
import com.pusher.java_websocket.drafts.Draft;
public class DefaultWebSocketServerFactory implements WebSocketServer.WebSocketServerFactory {
@Override
public WebSocketImpl createWebSocket(WebSocketAdapter a, Draft d, Socket s ) {
return new WebSocketImpl( a, d );
}
@Override
public WebSocketImpl createWebSocket( WebSocketAdapter a, List d, Socket s ) {
return new WebSocketImpl( a, d );
}
@Override
public SocketChannel wrapChannel( SocketChannel channel, SelectionKey key ) {
return (SocketChannel) channel;
}
}