ChannelMetadata Class — netty Architecture
Architecture documentation for the ChannelMetadata class in ChannelMetadata.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 4639d6db_de7d_84af_9875_e09bbf197dd7["ChannelMetadata"] ab9101d6_2808_d651_b634_2e68ec55a552["ChannelMetadata.java"] 4639d6db_de7d_84af_9875_e09bbf197dd7 -->|defined in| ab9101d6_2808_d651_b634_2e68ec55a552 38b91345_f535_5e61_83ef_6e307ec0ef54["ChannelMetadata()"] 4639d6db_de7d_84af_9875_e09bbf197dd7 -->|method| 38b91345_f535_5e61_83ef_6e307ec0ef54 55ed0cf3_909a_bbec_3754_e4df4211d58e["hasDisconnect()"] 4639d6db_de7d_84af_9875_e09bbf197dd7 -->|method| 55ed0cf3_909a_bbec_3754_e4df4211d58e 8dd30249_4db4_fab1_f0c6_28a766efb543["defaultMaxMessagesPerRead()"] 4639d6db_de7d_84af_9875_e09bbf197dd7 -->|method| 8dd30249_4db4_fab1_f0c6_28a766efb543
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/ChannelMetadata.java lines 25–72
public final class ChannelMetadata {
private final boolean hasDisconnect;
private final int defaultMaxMessagesPerRead;
/**
* Create a new instance
*
* @param hasDisconnect {@code true} if and only if the channel has the {@code disconnect()} operation
* that allows a user to disconnect and then call {@link Channel#connect(SocketAddress)}
* again, such as UDP/IP.
*/
public ChannelMetadata(boolean hasDisconnect) {
this(hasDisconnect, 16);
}
/**
* Create a new instance
*
* @param hasDisconnect {@code true} if and only if the channel has the {@code disconnect()} operation
* that allows a user to disconnect and then call {@link Channel#connect(SocketAddress)}
* again, such as UDP/IP.
* @param defaultMaxMessagesPerRead If a {@link MaxMessagesRecvByteBufAllocator} is in use, then this value will be
* set for {@link MaxMessagesRecvByteBufAllocator#maxMessagesPerRead()}. Must be {@code > 0}.
*/
public ChannelMetadata(boolean hasDisconnect, int defaultMaxMessagesPerRead) {
checkPositive(defaultMaxMessagesPerRead, "defaultMaxMessagesPerRead");
this.hasDisconnect = hasDisconnect;
this.defaultMaxMessagesPerRead = defaultMaxMessagesPerRead;
}
/**
* Returns {@code true} if and only if the channel has the {@code disconnect()} operation
* that allows a user to disconnect and then call {@link Channel#connect(SocketAddress)} again,
* such as UDP/IP.
*/
public boolean hasDisconnect() {
return hasDisconnect;
}
/**
* If a {@link MaxMessagesRecvByteBufAllocator} is in use, then this is the default value for
* {@link MaxMessagesRecvByteBufAllocator#maxMessagesPerRead()}.
*/
public int defaultMaxMessagesPerRead() {
return defaultMaxMessagesPerRead;
}
}
Source
Frequently Asked Questions
What is the ChannelMetadata class?
ChannelMetadata is a class in the netty codebase, defined in transport/src/main/java/io/netty/channel/ChannelMetadata.java.
Where is ChannelMetadata defined?
ChannelMetadata is defined in transport/src/main/java/io/netty/channel/ChannelMetadata.java at line 25.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free