testSerialization() — netty Function Reference
Architecture documentation for the testSerialization() function in EmbeddedChannelIdTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 8495c00c_7de3_701e_582f_ead52aab9c50["testSerialization()"] 09415989_7b67_43b6_5ff5_500d7fa3e835["EmbeddedChannelIdTest"] 8495c00c_7de3_701e_582f_ead52aab9c50 -->|defined in| 09415989_7b67_43b6_5ff5_500d7fa3e835 style 8495c00c_7de3_701e_582f_ead52aab9c50 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/test/java/io/netty/channel/embedded/EmbeddedChannelIdTest.java lines 33–51
@Test
public void testSerialization() throws IOException, ClassNotFoundException {
// test that a deserialized instance works the same as a normal instance (issue #2869)
ChannelId normalInstance = EmbeddedChannelId.INSTANCE;
ByteBuf buf = Unpooled.buffer();
try (ObjectOutputStream outStream = new ObjectOutputStream(new ByteBufOutputStream(buf))) {
outStream.writeObject(normalInstance);
}
final ChannelId deserializedInstance;
try (ObjectInputStream inStream = new ObjectInputStream(new ByteBufInputStream(buf, true))) {
deserializedInstance = (ChannelId) inStream.readObject();
}
assertEquals(normalInstance, deserializedInstance);
assertEquals(normalInstance.hashCode(), deserializedInstance.hashCode());
assertEquals(0, normalInstance.compareTo(deserializedInstance));
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testSerialization() do?
testSerialization() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/embedded/EmbeddedChannelIdTest.java.
Where is testSerialization() defined?
testSerialization() is defined in transport/src/test/java/io/netty/channel/embedded/EmbeddedChannelIdTest.java at line 33.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free