io.netty.channel.ChannelFactory#io.netty.testsuite.transport.TestsuitePermutation源码实例Demo

下面列出了io.netty.channel.ChannelFactory#io.netty.testsuite.transport.TestsuitePermutation 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: netty-4.1.22   文件: SocketMultipleConnectTest.java
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> factories
            = new ArrayList<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>>();
    for (TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap> comboFactory
            : SocketTestPermutation.INSTANCE.socket()) {
        if (comboFactory.newClientInstance().config().group() instanceof NioEventLoopGroup) {
            factories.add(comboFactory);
        }
    }
    return factories;
}
 
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> factories
            = new ArrayList<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>>();
    for (TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap> comboFactory
            : KQueueSocketTestPermutation.INSTANCE.socket()) {
        EventLoopGroup group = comboFactory.newClientInstance().config().group();
        if (group instanceof NioEventLoopGroup || group instanceof KQueueEventLoopGroup) {
            factories.add(comboFactory);
        }
    }
    return factories;
}
 
@Override
public List<TestsuitePermutation.BootstrapComboFactory<Bootstrap, Bootstrap>> datagram() {
    // Make the list of Bootstrap factories.
    @SuppressWarnings("unchecked")
    List<BootstrapFactory<Bootstrap>> bfs = Arrays.asList(
            new BootstrapFactory<Bootstrap>() {
                @Override
                public Bootstrap newInstance() {
                    return new Bootstrap().group(nioWorkerGroup).channelFactory(new ChannelFactory<Channel>() {
                        @Override
                        public Channel newChannel() {
                            return new NioDatagramChannel(InternetProtocolFamily.IPv4);
                        }

                        @Override
                        public String toString() {
                            return NioDatagramChannel.class.getSimpleName() + ".class";
                        }
                    });
                }
            },
            new BootstrapFactory<Bootstrap>() {
                @Override
                public Bootstrap newInstance() {
                    return new Bootstrap().group(KQUEUE_WORKER_GROUP).channel(KQueueDatagramChannel.class);
                }
            }
    );
    return combo(bfs, bfs);
}
 
@Override
public List<TestsuitePermutation.BootstrapComboFactory<Bootstrap, Bootstrap>> datagram() {
    // Make the list of Bootstrap factories.
    List<BootstrapFactory<Bootstrap>> bfs = Arrays.asList(
            new BootstrapFactory<Bootstrap>() {
                @Override
                public Bootstrap newInstance() {
                    return new Bootstrap().group(nioWorkerGroup).channelFactory(new ChannelFactory<Channel>() {
                        @Override
                        public Channel newChannel() {
                            return new NioDatagramChannel(InternetProtocolFamily.IPv4);
                        }

                        @Override
                        public String toString() {
                            return NioDatagramChannel.class.getSimpleName() + ".class";
                        }
                    });
                }
            },
            new BootstrapFactory<Bootstrap>() {
                @Override
                public Bootstrap newInstance() {
                    return new Bootstrap().group(EPOLL_WORKER_GROUP).channel(EpollDatagramChannel.class);
                }
            }
    );
    return combo(bfs, bfs);
}
 
源代码5 项目: netty-4.1.22   文件: EpollSocketTestPermutation.java
@Override
public List<TestsuitePermutation.BootstrapComboFactory<Bootstrap, Bootstrap>> datagram() {
    // Make the list of Bootstrap factories.
    @SuppressWarnings("unchecked")
    List<BootstrapFactory<Bootstrap>> bfs = Arrays.asList(
            new BootstrapFactory<Bootstrap>() {
                @Override
                public Bootstrap newInstance() {
                    return new Bootstrap().group(nioWorkerGroup).channelFactory(new ChannelFactory<Channel>() {
                        @Override
                        public Channel newChannel() {
                            return new NioDatagramChannel(InternetProtocolFamily.IPv4);
                        }

                        @Override
                        public String toString() {
                            return NioDatagramChannel.class.getSimpleName() + ".class";
                        }
                    });
                }
            },
            new BootstrapFactory<Bootstrap>() {
                @Override
                public Bootstrap newInstance() {
                    return new Bootstrap().group(EPOLL_WORKER_GROUP).channel(EpollDatagramChannel.class);
                }
            }
    );
    return combo(bfs, bfs);
}
 
源代码6 项目: netty-xnio-transport   文件: XnioTestsuiteUtils.java
static List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return Collections.<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>>singletonList(
            new TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>() {
                @Override
                public ServerBootstrap newServerInstance() {
                    return new ServerBootstrap().channel(XnioServerSocketChannel.class).group(GROUP);
                }

                @Override
                public Bootstrap newClientInstance() {
                    return new Bootstrap().channel(XnioSocketChannel.class).group(GROUP);
                }
            });
}
 
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
源代码8 项目: netty-4.1.22   文件: AbstractServerSocketTest.java
@Override
protected List<TestsuitePermutation.BootstrapFactory<ServerBootstrap>> newFactories() {
    return SocketTestPermutation.INSTANCE.serverSocket();
}
 
源代码9 项目: netty-4.1.22   文件: AbstractSocketTest.java
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return SocketTestPermutation.INSTANCE.socket();
}
 
@Override
protected List<TestsuitePermutation.BootstrapFactory<Bootstrap>> newFactories() {
    return SocketTestPermutation.INSTANCE.datagramSocket();
}
 
源代码11 项目: netty-4.1.22   文件: AbstractClientSocketTest.java
@Override
protected List<TestsuitePermutation.BootstrapFactory<Bootstrap>> newFactories() {
    return SocketTestPermutation.INSTANCE.clientSocket();
}
 
源代码12 项目: netty-4.1.22   文件: AbstractSctpTest.java
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return SctpTestPermutation.sctpChannel();
}
 
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return KQueueSocketTestPermutation.INSTANCE.domainSocket();
}
 
@Override
protected List<TestsuitePermutation.BootstrapFactory<Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.clientSocket();
}
 
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return KQueueSocketTestPermutation.INSTANCE.socket();
}
 
源代码16 项目: netty-xnio-transport   文件: XnioSocketEchoTest.java
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return XnioTestsuiteUtils.newFactories();
}
 
源代码17 项目: netty4.0.27Learn   文件: EpollSocketStartTlsTest.java
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
@Override
protected List<TestsuitePermutation.BootstrapFactory<Bootstrap>> newFactories() {
    return SocketTestPermutation.INSTANCE.clientSocket();
}
 
@Override
protected List<TestsuitePermutation.BootstrapFactory<ServerBootstrap>> newFactories() {
    return KQueueSocketTestPermutation.INSTANCE.serverSocket();
}
 
@Override
protected List<TestsuitePermutation.BootstrapFactory<Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.datagramSocket();
}
 
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return KQueueSocketTestPermutation.INSTANCE.socket();
}
 
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return KQueueSocketTestPermutation.INSTANCE.domainSocket();
}
 
@Override
protected List<TestsuitePermutation.BootstrapFactory<Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.clientSocket();
}
 
源代码24 项目: netty-4.1.22   文件: KQueueSocketObjectEchoTest.java
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return KQueueSocketTestPermutation.INSTANCE.socket();
}
 
源代码25 项目: netty-4.1.22   文件: KQueueETSocketAutoReadTest.java
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return KQueueSocketTestPermutation.INSTANCE.socket();
}
 
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return KQueueSocketTestPermutation.INSTANCE.socket();
}
 
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
public List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> domainSocket() {

        List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> list =
                combo(serverDomainSocket(), clientDomainSocket());
        return list;
    }
 
@Override
protected List<TestsuitePermutation.BootstrapFactory<ServerBootstrap>> newFactories() {
    return SocketTestPermutation.INSTANCE.serverSocket();
}
 
源代码30 项目: netty-4.1.22   文件: KQueueSocketSslGreetingTest.java
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return KQueueSocketTestPermutation.INSTANCE.socket();
}