f216aca1f1b4f650ed9a866996a24393c62991bb
[netconf.git] / transport / transport-tls / src / main / java / org / opendaylight / netconf / transport / tls / SslHandlerFactory.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.transport.tls;
9
10 import com.google.common.annotations.Beta;
11 import io.netty.channel.Channel;
12 import io.netty.handler.ssl.SslHandler;
13
14 /**
15  * Extension interface for external service integration with TLS transport. Used to build {@link TLSClient} and
16  * {@link TLSServer} instances.
17  */
18 @Beta
19 @FunctionalInterface
20 public interface SslHandlerFactory {
21     /**
22      * Builds {@link SslHandler} instance for given {@link Channel}.
23      *
24      * @param channel channel
25      * @return A SslHandler
26      */
27     SslHandler createSslHandler(Channel channel);
28 }