Fix build errors and warnings

This commit is contained in:
Trustin Lee 2013-01-30 21:46:59 +09:00
parent 1bb003d9ae
commit b1b0319bbe
3 changed files with 9 additions and 14 deletions

View File

@ -88,7 +88,7 @@ final class SocketTestPermutation {
bfs.add(new Factory<Bootstrap>() { bfs.add(new Factory<Bootstrap>() {
@Override @Override
public Bootstrap newInstance() { public Bootstrap newInstance() {
return new Bootstrap().group(new NioEventLoopGroup()).channelFactory(new ChannelFactory() { return new Bootstrap().group(new NioEventLoopGroup()).channelFactory(new ChannelFactory<Channel>() {
@Override @Override
public Channel newChannel() { public Channel newChannel() {
return new NioDatagramChannel(InternetProtocolFamily.IPv4); return new NioDatagramChannel(InternetProtocolFamily.IPv4);

View File

@ -27,8 +27,6 @@ import io.netty.bootstrap.ChannelFactory;
import io.netty.channel.Channel; import io.netty.channel.Channel;
import io.netty.channel.ChannelException; import io.netty.channel.ChannelException;
import io.netty.channel.udt.UdtChannel; import io.netty.channel.udt.UdtChannel;
import io.netty.logging.InternalLogger;
import io.netty.logging.InternalLoggerFactory;
import java.io.IOException; import java.io.IOException;
import java.nio.channels.spi.SelectorProvider; import java.nio.channels.spi.SelectorProvider;
@ -40,23 +38,20 @@ import java.nio.channels.spi.SelectorProvider;
* <p> * <p>
* Provides {@link SelectorProvider} for UDT channels. * Provides {@link SelectorProvider} for UDT channels.
*/ */
public final class NioUdtProvider implements ChannelFactory { public final class NioUdtProvider implements ChannelFactory<UdtChannel> {
private static final InternalLogger logger = InternalLoggerFactory
.getInstance(NioUdtProvider.class);
/** /**
* {@link ChannelFactory} for UDT Byte Acceptor. See {@link TypeUDT#STREAM} * {@link ChannelFactory} for UDT Byte Acceptor. See {@link TypeUDT#STREAM}
* and {@link KindUDT#ACCEPTOR}. * and {@link KindUDT#ACCEPTOR}.
*/ */
public static final ChannelFactory BYTE_ACCEPTOR = new NioUdtProvider( public static final ChannelFactory<UdtChannel> BYTE_ACCEPTOR = new NioUdtProvider(
TypeUDT.STREAM, KindUDT.ACCEPTOR); TypeUDT.STREAM, KindUDT.ACCEPTOR);
/** /**
* {@link ChannelFactory} for UDT Byte Connector. See {@link TypeUDT#STREAM} * {@link ChannelFactory} for UDT Byte Connector. See {@link TypeUDT#STREAM}
* and {@link KindUDT#CONNECTOR}. * and {@link KindUDT#CONNECTOR}.
*/ */
public static final ChannelFactory BYTE_CONNECTOR = new NioUdtProvider( public static final ChannelFactory<UdtChannel> BYTE_CONNECTOR = new NioUdtProvider(
TypeUDT.STREAM, KindUDT.CONNECTOR); TypeUDT.STREAM, KindUDT.CONNECTOR);
/** /**
@ -69,21 +64,21 @@ public final class NioUdtProvider implements ChannelFactory {
* {@link ChannelFactory} for UDT Byte Rendezvous. See * {@link ChannelFactory} for UDT Byte Rendezvous. See
* {@link TypeUDT#STREAM} and {@link KindUDT#RENDEZVOUS}. * {@link TypeUDT#STREAM} and {@link KindUDT#RENDEZVOUS}.
*/ */
public static final ChannelFactory BYTE_RENDEZVOUS = new NioUdtProvider( public static final ChannelFactory<UdtChannel> BYTE_RENDEZVOUS = new NioUdtProvider(
TypeUDT.STREAM, KindUDT.RENDEZVOUS); TypeUDT.STREAM, KindUDT.RENDEZVOUS);
/** /**
* {@link ChannelFactory} for UDT Message Acceptor. See * {@link ChannelFactory} for UDT Message Acceptor. See
* {@link TypeUDT#DATAGRAM} and {@link KindUDT#ACCEPTOR}. * {@link TypeUDT#DATAGRAM} and {@link KindUDT#ACCEPTOR}.
*/ */
public static final ChannelFactory MESSAGE_ACCEPTOR = new NioUdtProvider( public static final ChannelFactory<UdtChannel> MESSAGE_ACCEPTOR = new NioUdtProvider(
TypeUDT.DATAGRAM, KindUDT.ACCEPTOR); TypeUDT.DATAGRAM, KindUDT.ACCEPTOR);
/** /**
* {@link ChannelFactory} for UDT Message Connector. See * {@link ChannelFactory} for UDT Message Connector. See
* {@link TypeUDT#DATAGRAM} and {@link KindUDT#CONNECTOR}. * {@link TypeUDT#DATAGRAM} and {@link KindUDT#CONNECTOR}.
*/ */
public static final ChannelFactory MESSAGE_CONNECTOR = new NioUdtProvider( public static final ChannelFactory<UdtChannel> MESSAGE_CONNECTOR = new NioUdtProvider(
TypeUDT.DATAGRAM, KindUDT.CONNECTOR); TypeUDT.DATAGRAM, KindUDT.CONNECTOR);
/** /**
@ -96,7 +91,7 @@ public final class NioUdtProvider implements ChannelFactory {
* {@link ChannelFactory} for UDT Message Rendezvous. See * {@link ChannelFactory} for UDT Message Rendezvous. See
* {@link TypeUDT#DATAGRAM} and {@link KindUDT#RENDEZVOUS}. * {@link TypeUDT#DATAGRAM} and {@link KindUDT#RENDEZVOUS}.
*/ */
public static final ChannelFactory MESSAGE_RENDEZVOUS = new NioUdtProvider( public static final ChannelFactory<UdtChannel> MESSAGE_RENDEZVOUS = new NioUdtProvider(
TypeUDT.DATAGRAM, KindUDT.RENDEZVOUS); TypeUDT.DATAGRAM, KindUDT.RENDEZVOUS);
/** /**

View File

@ -26,4 +26,4 @@ public interface ChannelFactory<T extends Channel> {
* Creates a new channel. * Creates a new channel.
*/ */
T newChannel(); T newChannel();
} }