Channel Type — netty Architecture
Architecture documentation for the Channel type/interface in Channel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 3ff52f76_38cb_53f0_76b7_61f6903a1a91["Channel"] 570c8ab2_edfb_4862_84c2_73219d1bec3b["Channel.java"] 3ff52f76_38cb_53f0_76b7_61f6903a1a91 -->|defined in| 570c8ab2_edfb_4862_84c2_73219d1bec3b style 3ff52f76_38cb_53f0_76b7_61f6903a1a91 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/Channel.java lines 77–466
public interface Channel extends AttributeMap, ChannelOutboundInvoker, Comparable<Channel> {
/**
* Returns the globally unique identifier of this {@link Channel}.
*/
ChannelId id();
/**
* Return the {@link EventLoop} this {@link Channel} was registered to.
*/
EventLoop eventLoop();
/**
* Returns the parent of this channel.
*
* @return the parent channel.
* {@code null} if this channel does not have a parent channel.
*/
Channel parent();
/**
* Returns the configuration of this channel.
*/
ChannelConfig config();
/**
* Returns {@code true} if the {@link Channel} is open and may get active later
*/
boolean isOpen();
/**
* Returns {@code true} if the {@link Channel} is registered with an {@link EventLoop}.
*/
boolean isRegistered();
/**
* Return {@code true} if the {@link Channel} is active and so connected.
*/
boolean isActive();
/**
* Return the {@link ChannelMetadata} of the {@link Channel} which describe the nature of the {@link Channel}.
*/
ChannelMetadata metadata();
/**
* Returns the local address where this channel is bound to. The returned
* {@link SocketAddress} is supposed to be down-cast into more concrete
* type such as {@link InetSocketAddress} to retrieve the detailed
* information.
*
* @return the local address of this channel.
* {@code null} if this channel is not bound.
*/
SocketAddress localAddress();
/**
* Returns the remote address where this channel is connected to. The
* returned {@link SocketAddress} is supposed to be down-cast into more
* concrete type such as {@link InetSocketAddress} to retrieve the detailed
* information.
*
* @return the remote address of this channel.
* {@code null} if this channel is not connected.
* If this channel is not connected but it can receive messages
* from arbitrary remote addresses (e.g. {@link DatagramChannel},
* use {@link DatagramPacket#recipient()} to determine
* the origination of the received message as this method will
* return {@code null}.
*/
SocketAddress remoteAddress();
/**
* Returns the {@link ChannelFuture} which will be notified when this
* channel is closed. This method always returns the same future instance.
*/
ChannelFuture closeFuture();
/**
* Returns {@code true} if and only if the I/O thread will perform the
* requested write operation immediately. Any write requests made when
Source
Frequently Asked Questions
What is the Channel type?
Channel is a type/interface in the netty codebase, defined in transport/src/main/java/io/netty/channel/Channel.java.
Where is Channel defined?
Channel is defined in transport/src/main/java/io/netty/channel/Channel.java at line 77.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free