Search in sources :

Example 6 with ChannelOption

use of io.netty.channel.ChannelOption in project netty by netty.

the class ServerBootstrapConfig method toString.

@Override
public String toString() {
    StringBuilder buf = new StringBuilder(super.toString());
    buf.setLength(buf.length() - 1);
    buf.append(", ");
    EventLoopGroup childGroup = childGroup();
    if (childGroup != null) {
        buf.append("childGroup: ");
        buf.append(StringUtil.simpleClassName(childGroup));
        buf.append(", ");
    }
    Map<ChannelOption<?>, Object> childOptions = childOptions();
    if (!childOptions.isEmpty()) {
        buf.append("childOptions: ");
        buf.append(childOptions);
        buf.append(", ");
    }
    Map<AttributeKey<?>, Object> childAttrs = childAttrs();
    if (!childAttrs.isEmpty()) {
        buf.append("childAttrs: ");
        buf.append(childAttrs);
        buf.append(", ");
    }
    ChannelHandler childHandler = childHandler();
    if (childHandler != null) {
        buf.append("childHandler: ");
        buf.append(childHandler);
        buf.append(", ");
    }
    if (buf.charAt(buf.length() - 1) == '(') {
        buf.append(')');
    } else {
        buf.setCharAt(buf.length() - 2, ')');
        buf.setLength(buf.length() - 1);
    }
    return buf.toString();
}
Also used : AttributeKey(io.netty.util.AttributeKey) EventLoopGroup(io.netty.channel.EventLoopGroup) ChannelOption(io.netty.channel.ChannelOption) ChannelHandler(io.netty.channel.ChannelHandler)

Aggregations

ChannelOption (io.netty.channel.ChannelOption)6 AttributeKey (io.netty.util.AttributeKey)4 ChannelHandler (io.netty.channel.ChannelHandler)3 EventLoopGroup (io.netty.channel.EventLoopGroup)3 ChannelPipeline (io.netty.channel.ChannelPipeline)2 KeepAliveManager (io.grpc.internal.KeepAliveManager)1 Bootstrap (io.netty.bootstrap.Bootstrap)1 Channel (io.netty.channel.Channel)1 ChannelConfig (io.netty.channel.ChannelConfig)1 ChannelFuture (io.netty.channel.ChannelFuture)1 ChannelFutureListener (io.netty.channel.ChannelFutureListener)1 ChannelHandlerContext (io.netty.channel.ChannelHandlerContext)1 ServerChannel (io.netty.channel.ServerChannel)1 SocketChannelConfig (io.netty.channel.socket.SocketChannelConfig)1 Http2ChannelClosedException (io.netty.handler.codec.http2.StreamBufferingEncoder.Http2ChannelClosedException)1 SocketAddress (java.net.SocketAddress)1 ClosedChannelException (java.nio.channels.ClosedChannelException)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Entry (java.util.Map.Entry)1