1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package io.netty.testsuite.transport;
17
18 import io.netty.bootstrap.AbstractBootstrap;
19 import io.netty.buffer.AdaptiveByteBufAllocator;
20 import io.netty.buffer.ByteBufAllocator;
21 import io.netty.buffer.PooledByteBufAllocator;
22 import io.netty.buffer.UnpooledByteBufAllocator;
23
24 import java.util.ArrayList;
25 import java.util.List;
26
27 public final class TestsuitePermutation {
28 private static final AdaptiveByteBufAllocator DEFAULT_ADAPTIVE_ALLOCATOR = new AdaptiveByteBufAllocator();
29
30 public static List<ByteBufAllocator> allocator() {
31 List<ByteBufAllocator> allocators = new ArrayList<ByteBufAllocator>();
32 allocators.add(UnpooledByteBufAllocator.DEFAULT);
33 allocators.add(PooledByteBufAllocator.DEFAULT);
34 allocators.add(DEFAULT_ADAPTIVE_ALLOCATOR);
35 return allocators;
36 }
37
38 private TestsuitePermutation() { }
39
40 public interface BootstrapFactory<CB extends AbstractBootstrap<?, ?>> {
41 CB newInstance();
42 }
43
44 public interface BootstrapComboFactory<SB extends AbstractBootstrap<?, ?>, CB extends AbstractBootstrap<?, ?>> {
45 SB newServerInstance();
46 CB newClientInstance();
47 }
48 }