SctpTestPermutation Class — netty Architecture
Architecture documentation for the SctpTestPermutation class in SctpTestPermutation.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 3441e8d1_071f_8f60_91b2_bf7755ab0cc1["SctpTestPermutation"] 31264a0e_5e12_0e20_6a27_52be2d6323d0["SctpTestPermutation.java"] 3441e8d1_071f_8f60_91b2_bf7755ab0cc1 -->|defined in| 31264a0e_5e12_0e20_6a27_52be2d6323d0 fb025d8f_200e_350a_7c0b_0f441ec7c9b8["sctpServerChannel()"] 3441e8d1_071f_8f60_91b2_bf7755ab0cc1 -->|method| fb025d8f_200e_350a_7c0b_0f441ec7c9b8 bfeb5b2f_4347_4859_df6a_666fdb9def43["sctpClientChannel()"] 3441e8d1_071f_8f60_91b2_bf7755ab0cc1 -->|method| bfeb5b2f_4347_4859_df6a_666fdb9def43 c67aae3d_711b_9df8_53d5_df05aafbadb7["sctpChannel()"] 3441e8d1_071f_8f60_91b2_bf7755ab0cc1 -->|method| c67aae3d_711b_9df8_53d5_df05aafbadb7 c743daba_36b1_16d4_69a0_d62477cfb704["SctpTestPermutation()"] 3441e8d1_071f_8f60_91b2_bf7755ab0cc1 -->|method| c743daba_36b1_16d4_69a0_d62477cfb704
Relationship Graph
Source Code
testsuite/src/main/java/io/netty/testsuite/transport/sctp/SctpTestPermutation.java lines 37–126
public final class SctpTestPermutation {
private static final int NUM_THREADS = 4;
private static final EventLoopGroup NIO_GROUP = new MultiThreadIoEventLoopGroup(
NUM_THREADS, new DefaultThreadFactory("testsuite-sctp-nio", true), NioIoHandler.newFactory());
private static final EventLoopGroup OIO_GROUP =
new OioEventLoopGroup(Integer.MAX_VALUE, new DefaultThreadFactory("testsuite-sctp-oio-worker", true));
static List<BootstrapFactory<ServerBootstrap>> sctpServerChannel() {
if (!TestUtils.isSctpSupported()) {
return Collections.emptyList();
}
List<BootstrapFactory<ServerBootstrap>> list = new ArrayList<BootstrapFactory<ServerBootstrap>>();
// Make the list of ServerBootstrap factories.
list.add(new BootstrapFactory<ServerBootstrap>() {
@Override
public ServerBootstrap newInstance() {
return new ServerBootstrap().
group(NIO_GROUP).
channel(NioSctpServerChannel.class);
}
});
list.add(new BootstrapFactory<ServerBootstrap>() {
@Override
public ServerBootstrap newInstance() {
return new ServerBootstrap().
group(OIO_GROUP).
channel(OioSctpServerChannel.class);
}
});
return list;
}
static List<BootstrapFactory<Bootstrap>> sctpClientChannel() {
if (!TestUtils.isSctpSupported()) {
return Collections.emptyList();
}
List<BootstrapFactory<Bootstrap>> list = new ArrayList<BootstrapFactory<Bootstrap>>();
list.add(new BootstrapFactory<Bootstrap>() {
@Override
public Bootstrap newInstance() {
return new Bootstrap().group(NIO_GROUP).channel(NioSctpChannel.class);
}
});
list.add(new BootstrapFactory<Bootstrap>() {
@Override
public Bootstrap newInstance() {
return new Bootstrap().group(OIO_GROUP).channel(OioSctpChannel.class);
}
});
return list;
}
static List<BootstrapComboFactory<ServerBootstrap, Bootstrap>> sctpChannel() {
List<BootstrapComboFactory<ServerBootstrap, Bootstrap>> list =
new ArrayList<BootstrapComboFactory<ServerBootstrap, Bootstrap>>();
// Make the list of SCTP ServerBootstrap factories.
List<BootstrapFactory<ServerBootstrap>> sbfs = sctpServerChannel();
// Make the list of SCTP Bootstrap factories.
List<BootstrapFactory<Bootstrap>> cbfs = sctpClientChannel();
// Populate the combinations
for (BootstrapFactory<ServerBootstrap> sbf: sbfs) {
for (BootstrapFactory<Bootstrap> cbf: cbfs) {
final BootstrapFactory<ServerBootstrap> sbf0 = sbf;
final BootstrapFactory<Bootstrap> cbf0 = cbf;
list.add(new BootstrapComboFactory<ServerBootstrap, Bootstrap>() {
@Override
public ServerBootstrap newServerInstance() {
return sbf0.newInstance();
}
@Override
public Bootstrap newClientInstance() {
return cbf0.newInstance();
}
Source
Frequently Asked Questions
What is the SctpTestPermutation class?
SctpTestPermutation is a class in the netty codebase, defined in testsuite/src/main/java/io/netty/testsuite/transport/sctp/SctpTestPermutation.java.
Where is SctpTestPermutation defined?
SctpTestPermutation is defined in testsuite/src/main/java/io/netty/testsuite/transport/sctp/SctpTestPermutation.java at line 37.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free