Rework SslHandlerFactory
[netconf.git] / apps / callhome-provider / src / main / java / org / opendaylight / netconf / callhome / server / CallHomeSessionContext.java
1 /*
2  * Copyright (c) 2023 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.callhome.server;
9
10 import com.google.common.util.concurrent.SettableFuture;
11 import org.opendaylight.netconf.client.NetconfClientSession;
12 import org.opendaylight.netconf.client.NetconfClientSessionListener;
13
14 /**
15  * Session Context for incoming Call-Home connections.
16  */
17 public interface CallHomeSessionContext {
18
19     /**
20      * Returns unique identifier of a connected device.
21      *
22      * @return identifier
23      */
24     String id();
25
26     /**
27      * Returns {@link NetconfClientSessionListener} associated with Netconf session expected to be established
28      * through current connection.
29      *
30      * @return netconf session listener
31      */
32     NetconfClientSessionListener netconfSessionListener();
33
34     /**
35      * Returns {@link SettableFuture} for {@link NetconfClientSessionListener} expected to be established
36      * through current connection.
37      *
38      * @return settable future for netconf session
39      */
40     SettableFuture<NetconfClientSession> settableFuture();
41
42     /**
43      * Terminates current connection.
44      */
45     void close();
46 }