Refactor ClientFactoryManagerConfigurator
[netconf.git] / transport / transport-ssh / src / main / java / org / opendaylight / netconf / transport / ssh / ClientFactoryManagerConfigurator.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.ssh;
9
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.netconf.shaded.sshd.client.ClientFactoryManager;
12 import org.opendaylight.netconf.transport.api.UnsupportedConfigurationException;
13
14 /**
15  * Extension interface allowing one to customize {@link ClientFactoryManager} before it is used to create the
16  * {@link SSHClient} instance.
17  */
18 public abstract class ClientFactoryManagerConfigurator {
19     /**
20      * Apply custom configuration.
21      *
22      * @param factoryManager client factory manager instance
23      * @throws UnsupportedConfigurationException if the configuration is not acceptable
24      */
25     protected abstract void configureClientFactoryManager(@NonNull ClientFactoryManager factoryManager)
26         throws UnsupportedConfigurationException;
27 }