X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fcallhome-server%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fcallhome%2Fserver%2Ftls%2FCallHomeTlsSessionContext.java;fp=netconf%2Fcallhome-server%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fcallhome%2Fserver%2Ftls%2FCallHomeTlsSessionContext.java;h=0000000000000000000000000000000000000000;hb=abb7dc0724a257ab8bac8f4d523c2ec24186decf;hp=221949e76381bf9be483500702d5d79732d72a0d;hpb=6aba89d85fae22bb93e52e2359b232f6f526b29e;p=netconf.git diff --git a/netconf/callhome-server/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsSessionContext.java b/netconf/callhome-server/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsSessionContext.java deleted file mode 100644 index 221949e763..0000000000 --- a/netconf/callhome-server/src/main/java/org/opendaylight/netconf/callhome/server/tls/CallHomeTlsSessionContext.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2023 PANTHEON.tech s.r.o. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.netconf.callhome.server.tls; - -import static java.util.Objects.requireNonNull; - -import com.google.common.base.MoreObjects; -import com.google.common.util.concurrent.SettableFuture; -import io.netty.channel.Channel; -import org.opendaylight.netconf.callhome.server.CallHomeSessionContext; -import org.opendaylight.netconf.client.NetconfClientSession; -import org.opendaylight.netconf.client.NetconfClientSessionListener; - -public record CallHomeTlsSessionContext(String id, Channel nettyChannel, - NetconfClientSessionListener netconfSessionListener, SettableFuture settableFuture) - implements CallHomeSessionContext { - - public CallHomeTlsSessionContext { - requireNonNull(id); - requireNonNull(nettyChannel); - requireNonNull(netconfSessionListener); - requireNonNull(settableFuture); - } - - @Override - public void close() { - if (nettyChannel.isOpen()) { - nettyChannel.close(); - } - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("protocol", "TLS") - .add("id", id) - .add("address", nettyChannel.remoteAddress()) - .toString(); - } -}