X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fcallhome-server%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fcallhome%2Fserver%2FCallHomeSessionContext.java;fp=netconf%2Fcallhome-server%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fcallhome%2Fserver%2FCallHomeSessionContext.java;h=cf28f554101dad69e867d9547f569965477e4b65;hb=d9e2c4371c3b46c69482aad989a78de5fab4e26e;hp=0000000000000000000000000000000000000000;hpb=82a4a9b7371aa8e8f4a13aef73cafb75891d568f;p=netconf.git diff --git a/netconf/callhome-server/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeSessionContext.java b/netconf/callhome-server/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeSessionContext.java new file mode 100644 index 0000000000..cf28f55410 --- /dev/null +++ b/netconf/callhome-server/src/main/java/org/opendaylight/netconf/callhome/server/CallHomeSessionContext.java @@ -0,0 +1,46 @@ +/* + * 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; + +import com.google.common.util.concurrent.SettableFuture; +import org.opendaylight.netconf.client.NetconfClientSession; +import org.opendaylight.netconf.client.NetconfClientSessionListener; + +/** + * Session Context for incoming Call-Home connections. + */ +public interface CallHomeSessionContext { + + /** + * Returns unique identifier of a connected device. + * + * @return identifier + */ + String id(); + + /** + * Returns {@link NetconfClientSessionListener} associated with Netconf session expected to be established + * through current connection. + * + * @return netconf session listener + */ + NetconfClientSessionListener netconfSessionListener(); + + /** + * Returns {@link SettableFuture} for {@link NetconfClientSessionListener} expected to be established + * through current connection. + * + * @return settable future for netconf session + */ + SettableFuture settableFuture(); + + /** + * Terminates current connection. + */ + void close(); +}