4d0061eff66f675603e292e60913b99260cf50e0
[netconf.git] / plugins / netconf-client-mdsal / src / main / java / org / opendaylight / netconf / client / mdsal / api / SslHandlerFactoryProvider.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.client.mdsal.api;
9
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.eclipse.jdt.annotation.Nullable;
12 import org.opendaylight.netconf.client.SslHandlerFactory;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev240120.connection.parameters.protocol.Specification;
14
15 /**
16  * A provider for {@link SslHandlerFactory} implementations. This allows the factory to be tailored with a
17  * {@link Specification}.
18  */
19 public interface SslHandlerFactoryProvider {
20     /**
21      * Return a {@link SslHandlerFactory}, optionally conforming to a particular specification.
22      *
23      * @param specification A {@link Specification}, may be {@code null}
24      * @return A {@link SslHandlerFactory}
25      * @throws IllegalArgumentException if {@code specification} is not {@code null} and it is not supported by this
26      *         provider.
27      */
28     @NonNull SslHandlerFactory getSslHandlerFactory(@Nullable Specification specification);
29 }