testChannelInputShutdownEvent() — netty Function Reference
Architecture documentation for the testChannelInputShutdownEvent() function in ReplayingDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD bd2e091e_cef7_2695_62fb_71fb41df8777["testChannelInputShutdownEvent()"] 342ea63b_1bca_5900_7b37_0cc8ddc3402d["ReplayingDecoderTest"] bd2e091e_cef7_2695_62fb_71fb41df8777 -->|defined in| 342ea63b_1bca_5900_7b37_0cc8ddc3402d 0bda4795_4d98_a4e1_d850_763cc1379646["decode()"] bd2e091e_cef7_2695_62fb_71fb41df8777 -->|calls| 0bda4795_4d98_a4e1_d850_763cc1379646 style bd2e091e_cef7_2695_62fb_71fb41df8777 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-base/src/test/java/io/netty/handler/codec/ReplayingDecoderTest.java lines 259–292
@Test
public void testChannelInputShutdownEvent() {
final AtomicReference<Error> error = new AtomicReference<Error>();
EmbeddedChannel channel = new EmbeddedChannel(new ReplayingDecoder<Integer>(0) {
private boolean decoded;
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
if (!(in instanceof ReplayingDecoderByteBuf)) {
error.set(new AssertionError("in must be of type " + ReplayingDecoderByteBuf.class
+ " but was " + in.getClass()));
return;
}
if (!decoded) {
decoded = true;
in.readByte();
state(1);
} else {
// This will throw an ReplayingError
in.skipBytes(Integer.MAX_VALUE);
}
}
});
assertFalse(channel.writeInbound(Unpooled.wrappedBuffer(new byte[] {0, 1})));
channel.pipeline().fireUserEventTriggered(ChannelInputShutdownEvent.INSTANCE);
assertFalse(channel.finishAndReleaseAll());
Error err = error.get();
if (err != null) {
throw err;
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testChannelInputShutdownEvent() do?
testChannelInputShutdownEvent() is a function in the netty codebase, defined in codec-base/src/test/java/io/netty/handler/codec/ReplayingDecoderTest.java.
Where is testChannelInputShutdownEvent() defined?
testChannelInputShutdownEvent() is defined in codec-base/src/test/java/io/netty/handler/codec/ReplayingDecoderTest.java at line 259.
What does testChannelInputShutdownEvent() call?
testChannelInputShutdownEvent() calls 1 function(s): decode.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free