ChannelHealthChecker Type — netty Architecture
Architecture documentation for the ChannelHealthChecker type/interface in ChannelHealthChecker.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d44df7cb_10fe_59eb_498c_9ca9f96ac415["ChannelHealthChecker"] 70cadda6_1b2d_bd51_edf8_484d88ae8bd7["ChannelHealthChecker.java"] d44df7cb_10fe_59eb_498c_9ca9f96ac415 -->|defined in| 70cadda6_1b2d_bd51_edf8_484d88ae8bd7 style d44df7cb_10fe_59eb_498c_9ca9f96ac415 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/pool/ChannelHealthChecker.java lines 27–47
public interface ChannelHealthChecker {
/**
* {@link ChannelHealthChecker} implementation that checks if {@link Channel#isActive()} returns {@code true}.
*/
ChannelHealthChecker ACTIVE = new ChannelHealthChecker() {
@Override
public Future<Boolean> isHealthy(Channel channel) {
EventLoop loop = channel.eventLoop();
return channel.isActive()? loop.newSucceededFuture(Boolean.TRUE) : loop.newSucceededFuture(Boolean.FALSE);
}
};
/**
* Check if the given channel is healthy which means it can be used. The returned {@link Future} is notified once
* the check is complete. If notified with {@link Boolean#TRUE} it can be used {@link Boolean#FALSE} otherwise.
*
* This method will be called by the {@link EventLoop} of the {@link Channel}.
*/
Future<Boolean> isHealthy(Channel channel);
}
Source
Frequently Asked Questions
What is the ChannelHealthChecker type?
ChannelHealthChecker is a type/interface in the netty codebase, defined in transport/src/main/java/io/netty/channel/pool/ChannelHealthChecker.java.
Where is ChannelHealthChecker defined?
ChannelHealthChecker is defined in transport/src/main/java/io/netty/channel/pool/ChannelHealthChecker.java at line 27.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free