adc0810cc70269f1962a3d3a48cdd0fd5f2dec0e
[netconf.git] / netconf / callhome-protocol / src / main / java / org / opendaylight / netconf / callhome / protocol / CallHomeProtocolSessionContext.java
1 /*
2  * Copyright (c) 2016 Brocade Communication Systems 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.protocol;
9
10 import java.net.SocketAddress;
11 import java.security.PublicKey;
12
13 /**
14  * Protocol level Session Context for incoming Call Home connections.
15  */
16 public interface CallHomeProtocolSessionContext {
17
18     /**
19      * Returns session identifier provided by  CallHomeAuthorizationProvider.
20      *
21      * @return Returns application-provided session identifier
22      */
23     String getSessionId();
24
25     /**
26      * Returns public key provided by remote SSH Server for this session.
27      *
28      * @return public key provided by remote SSH Server
29      */
30     PublicKey getRemoteServerKey();
31
32     /**
33      * Returns remote socket address associated with this session.
34      *
35      * @return remote socket address associated with this session.
36      */
37     SocketAddress getRemoteAddress();
38
39     /**
40      * Terminate this session.
41      */
42     void terminate();
43
44     /**
45      * Returns transport type for this session.
46      *
47      * @return {@link TransportType} for this session.
48      */
49     TransportType getTransportType();
50 }