2 * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.netconf.transport.api;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.base.MoreObjects.ToStringHelper;
13 import io.netty.channel.Channel;
16 * Abstract base class for {@link TransportChannel}s overlaid on another {@link TransportChannel}.
18 public abstract class AbstractOverlayTransportChannel extends TransportChannel {
19 private final TransportChannel underlay;
21 protected AbstractOverlayTransportChannel(final TransportChannel tcp) {
22 underlay = requireNonNull(tcp);
26 public final Channel channel() {
27 return underlay.channel();
31 protected ToStringHelper addToStringAttributes(final ToStringHelper helper) {
32 return helper.add("underlay", underlay);