Add transport-{api,tcp}
[netconf.git] / transport / transport-tcp / src / main / java / org / opendaylight / netconf / transport / tcp / TCPTransportChannel.java
1 /*
2  * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.netconf.transport.tcp;
9
10 import static java.util.Objects.requireNonNull;
11
12 import io.netty.channel.Channel;
13 import org.eclipse.jdt.annotation.NonNullByDefault;
14 import org.opendaylight.netconf.transport.api.TransportChannel;
15
16 /**
17  * A TCP {@link TransportChannel}.
18  */
19 @NonNullByDefault
20 public final class TCPTransportChannel extends TransportChannel {
21     private final Channel channel;
22
23     TCPTransportChannel(final Channel channel) {
24         this.channel = requireNonNull(channel);
25     }
26
27     @Override
28     public Channel channel() {
29         return channel;
30     }
31 }