package com.atlassian.bitbucket.internal.ssh.server;

import org.apache.sshd.common.NamedFactory;

import javax.annotation.Nonnull;
import java.util.List;

/**
 * Filters factories by name.
 *
 * @since 3.9
 */
public interface NamedFactoryFilter {
    /**
     * Filters factories by name.
     *
     * @param defaultFactories default named factories
     * @param namedFactoryType provides the property name in the configuration file which contains the factories to disable
     * @return the filtered factories
     */
    <T> List<NamedFactory<T>> filter(@Nonnull List<NamedFactory<T>> defaultFactories,
                                     @Nonnull NamedFactoryType namedFactoryType);
}
