Organized imports.

This commit is contained in:
Dennis Boldt 2012-02-21 03:06:26 +01:00
parent a715220556
commit b3cc305578
10 changed files with 14 additions and 44 deletions

View File

@ -16,17 +16,11 @@
package io.netty.handler.codec.http.websocketx; package io.netty.handler.codec.http.websocketx;
import java.net.URI; import java.net.URI;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Map; import java.util.Map;
import io.netty.buffer.ChannelBuffer;
import io.netty.buffer.ChannelBuffers;
import io.netty.channel.Channel; import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFuture;
import io.netty.handler.codec.base64.Base64;
import io.netty.handler.codec.http.HttpResponse; import io.netty.handler.codec.http.HttpResponse;
import io.netty.util.CharsetUtil;
/** /**
* Base class for web socket client handshake implementations * Base class for web socket client handshake implementations
@ -111,7 +105,7 @@ public abstract class WebSocketClientHandshaker {
/** /**
* Begins the opening handshake * Begins the opening handshake
* *
* @param channel * @param channel
* Channel * Channel
*/ */
@ -119,7 +113,7 @@ public abstract class WebSocketClientHandshaker {
/** /**
* Validates and finishes the opening handshake initiated by {@link #handshake}}. * Validates and finishes the opening handshake initiated by {@link #handshake}}.
* *
* @param channel * @param channel
* Channel * Channel
* @param response * @param response

View File

@ -15,18 +15,12 @@
*/ */
package io.netty.handler.codec.http.websocketx; package io.netty.handler.codec.http.websocketx;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.Set; import java.util.Set;
import io.netty.buffer.ChannelBuffer;
import io.netty.buffer.ChannelBuffers;
import io.netty.channel.Channel; import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFuture;
import io.netty.handler.codec.base64.Base64;
import io.netty.handler.codec.http.HttpRequest; import io.netty.handler.codec.http.HttpRequest;
import io.netty.util.CharsetUtil;
/** /**
* Base class for server side web socket opening and closing handshakes * Base class for server side web socket opening and closing handshakes
@ -41,7 +35,7 @@ public abstract class WebSocketServerHandshaker {
/** /**
* Constructor specifying the destination web socket location * Constructor specifying the destination web socket location
* *
* @param version * @param version
* the protocol version * the protocol version
* @param webSocketUrl * @param webSocketUrl
@ -92,7 +86,7 @@ public abstract class WebSocketServerHandshaker {
/** /**
* Performs the opening handshake * Performs the opening handshake
* *
* @param channel * @param channel
* Channel * Channel
* @param req * @param req
@ -102,7 +96,7 @@ public abstract class WebSocketServerHandshaker {
/** /**
* Performs the closing handshake * Performs the closing handshake
* *
* @param channel * @param channel
* Channel * Channel
* @param frame * @param frame
@ -112,7 +106,7 @@ public abstract class WebSocketServerHandshaker {
/** /**
* Selects the first matching supported sub protocol * Selects the first matching supported sub protocol
* *
* @param requestedSubprotocols * @param requestedSubprotocols
* CSV of protocols to be supported. e.g. "chat, superchat" * CSV of protocols to be supported. e.g. "chat, superchat"
* @return First matching supported sub protocol. Null if not found. * @return First matching supported sub protocol. Null if not found.

View File

@ -17,9 +17,6 @@ package io.netty.example.http.websocketx.autobahn;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.logging.ConsoleHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import io.netty.bootstrap.ServerBootstrap; import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.socket.nio.NioServerSocketChannelFactory; import io.netty.channel.socket.nio.NioServerSocketChannelFactory;

View File

@ -17,23 +17,20 @@ package io.netty.example.http.websocketx.server;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.logging.ConsoleHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import io.netty.bootstrap.ServerBootstrap; import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.socket.nio.NioServerSocketChannelFactory; import io.netty.channel.socket.nio.NioServerSocketChannelFactory;
/** /**
* A HTTP server which serves Web Socket requests at: * A HTTP server which serves Web Socket requests at:
* *
* http://localhost:8080/websocket * http://localhost:8080/websocket
* *
* Open your browser at http://localhost:8080/, then the demo page will be loaded and a Web Socket connection will be * Open your browser at http://localhost:8080/, then the demo page will be loaded and a Web Socket connection will be
* made automatically. * made automatically.
* *
* This server illustrates support for the different web socket specification versions and will work with: * This server illustrates support for the different web socket specification versions and will work with:
* *
* <ul> * <ul>
* <li>Safari 5+ (draft-ietf-hybi-thewebsocketprotocol-00) * <li>Safari 5+ (draft-ietf-hybi-thewebsocketprotocol-00)
* <li>Chrome 6-13 (draft-ietf-hybi-thewebsocketprotocol-00) * <li>Chrome 6-13 (draft-ietf-hybi-thewebsocketprotocol-00)

View File

@ -17,23 +17,20 @@ package io.netty.example.http.websocketx.sslserver;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.logging.ConsoleHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import io.netty.bootstrap.ServerBootstrap; import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.socket.nio.NioServerSocketChannelFactory; import io.netty.channel.socket.nio.NioServerSocketChannelFactory;
/** /**
* A HTTP server which serves Web Socket requests at: * A HTTP server which serves Web Socket requests at:
* *
* https://localhost:8081/websocket * https://localhost:8081/websocket
* *
* Open your browser at https://localhost:8081/, then the demo page will be loaded and a Web Socket connection will be * Open your browser at https://localhost:8081/, then the demo page will be loaded and a Web Socket connection will be
* made automatically. * made automatically.
* *
* This server illustrates support for the different web socket specification versions and will work with: * This server illustrates support for the different web socket specification versions and will work with:
* *
* <ul> * <ul>
* <li>Safari 5+ (draft-ietf-hybi-thewebsocketprotocol-00) * <li>Safari 5+ (draft-ietf-hybi-thewebsocketprotocol-00)
* <li>Chrome 6-13 (draft-ietf-hybi-thewebsocketprotocol-00) * <li>Chrome 6-13 (draft-ietf-hybi-thewebsocketprotocol-00)

View File

@ -17,7 +17,6 @@ package io.netty.channel.sctp;
import io.netty.channel.ReceiveBufferSizePredictor; import io.netty.channel.ReceiveBufferSizePredictor;
import io.netty.channel.ReceiveBufferSizePredictorFactory; import io.netty.channel.ReceiveBufferSizePredictorFactory;
import io.netty.channel.socket.SocketChannelConfig;
/** /**
* A {@link io.netty.channel.sctp.SctpChannelConfig} for a NIO SCTP/IP {@link io.netty.channel.sctp.SctpChannel}. * A {@link io.netty.channel.sctp.SctpChannelConfig} for a NIO SCTP/IP {@link io.netty.channel.sctp.SctpChannel}.

View File

@ -18,9 +18,6 @@ package io.netty.channel.sctp;
import com.sun.nio.sctp.Association; import com.sun.nio.sctp.Association;
import io.netty.channel.Channel; import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFuture;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.SocketChannelConfig;
import io.netty.channel.socket.nio.NioSocketChannelConfig;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;

View File

@ -15,7 +15,6 @@
*/ */
package io.netty.testsuite.transport; package io.netty.testsuite.transport;
import com.sun.nio.sctp.SctpChannel;
import com.sun.nio.sctp.SctpServerChannel; import com.sun.nio.sctp.SctpServerChannel;
import io.netty.bootstrap.ClientBootstrap; import io.netty.bootstrap.ClientBootstrap;
import io.netty.channel.ChannelFactory; import io.netty.channel.ChannelFactory;
@ -40,7 +39,6 @@ import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;

View File

@ -23,8 +23,6 @@ import io.netty.channel.*;
import io.netty.channel.sctp.SctpClientSocketChannelFactory; import io.netty.channel.sctp.SctpClientSocketChannelFactory;
import io.netty.channel.sctp.SctpFrame; import io.netty.channel.sctp.SctpFrame;
import io.netty.channel.sctp.SctpServerSocketChannelFactory; import io.netty.channel.sctp.SctpServerSocketChannelFactory;
import io.netty.channel.sctp.codec.SctpFrameDecoder;
import io.netty.channel.sctp.codec.SctpFrameEncoder;
import io.netty.testsuite.util.SctpSocketAddresses; import io.netty.testsuite.util.SctpSocketAddresses;
import io.netty.util.internal.ExecutorUtil; import io.netty.util.internal.ExecutorUtil;
import org.junit.AfterClass; import org.junit.AfterClass;

View File

@ -16,7 +16,6 @@
package io.netty.testsuite.transport.sctp; package io.netty.testsuite.transport.sctp;
import io.netty.channel.ChannelFactory; import io.netty.channel.ChannelFactory;
import io.netty.channel.sctp.SctpClientSocketChannelFactory;
import io.netty.channel.sctp.SctpServerSocketChannelFactory; import io.netty.channel.sctp.SctpServerSocketChannelFactory;
import io.netty.testsuite.transport.AbstractSocketServerBootstrapTest; import io.netty.testsuite.transport.AbstractSocketServerBootstrapTest;