e71315615dc84f6e33b14de211a8acb0f04e2704
[netconf.git] / protocol / netconf-client / src / main / java / org / opendaylight / netconf / client / SslHandlerFactory.java
1 /*
2  * Copyright (c) 2018 ZTE Corporation. 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.client;
9
10 import io.netty.handler.ssl.SslHandler;
11 import java.util.Set;
12
13 /**
14  * Basic interface for {@link SslHandler} builder. Used to establish TSL connection.
15  *
16  * @deprecated due to design change. SslHandler will be created dynamically based on TLS layer configuration
17  *     {@link org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.tls.client.rev231228.TlsClientGrouping}
18  *     by {@link NetconfClientFactory}.
19  */
20 @Deprecated
21 public interface SslHandlerFactory {
22     /**
23      * This factory is used by the TLS client to create SslHandler that will be added into the channel pipeline when
24      * the channel is active.
25      */
26     default SslHandler createSslHandler() {
27         return createSslHandler(Set.of());
28     }
29
30     SslHandler createSslHandler(Set<String> allowedKeys);
31 }