1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package io.netty5.channel;
17
18 import java.net.SocketAddress;
19
20
21
22
23
24
25
26
27
28
29
30
31
32 public abstract class AbstractServerChannel<P extends Channel, L extends SocketAddress, R extends SocketAddress>
33 extends AbstractChannel<P, L, R> implements ServerChannel {
34 private static final ChannelMetadata METADATA = new ChannelMetadata(false, 16);
35
36 private final EventLoopGroup childEventLoopGroup;
37
38
39
40
41 protected AbstractServerChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup,
42 Class<? extends Channel> childChannelType) {
43 this(eventLoop, childEventLoopGroup, METADATA, childChannelType);
44 }
45
46 protected AbstractServerChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, ChannelMetadata metadata,
47 Class<? extends Channel> childChannelType) {
48 super(null, eventLoop, metadata, new ServerChannelRecvBufferAllocator());
49 this.childEventLoopGroup = validateEventLoopGroup(childEventLoopGroup, "childEventLoopGroup", childChannelType);
50 }
51
52 @Override
53 public final EventLoopGroup childEventLoopGroup() {
54 return childEventLoopGroup;
55 }
56
57 @Override
58 protected final R remoteAddress0() {
59 return null;
60 }
61
62 @Override
63 protected final void doDisconnect() {
64 throw new UnsupportedOperationException();
65 }
66
67 @Override
68 protected final void doShutdown(ChannelShutdownDirection direction) {
69 throw new UnsupportedOperationException();
70 }
71
72 @Override
73 public final boolean isShutdown(ChannelShutdownDirection direction) {
74 return !isActive();
75 }
76
77 @Override
78 protected final void doWrite(ChannelOutboundBuffer in) {
79 throw new UnsupportedOperationException();
80 }
81
82 @Override
83 protected final Object filterOutboundMessage(Object msg) {
84 throw new UnsupportedOperationException();
85 }
86
87 @Override
88 protected boolean doConnect(SocketAddress remoteAddress, SocketAddress localAddress) {
89 throw new UnsupportedOperationException();
90 }
91
92 @Override
93 protected boolean doFinishConnect(R requestedRemoteAddress) {
94 throw new UnsupportedOperationException();
95 }
96 }