/* * Copyright 2010 netling project <http://netling.org> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.netling.ssh; import java.util.List; import org.netling.ssh.common.Factory; import org.netling.ssh.signature.Signature; import org.netling.ssh.transport.cipher.Cipher; import org.netling.ssh.transport.compression.Compression; import org.netling.ssh.transport.kex.KeyExchange; import org.netling.ssh.transport.mac.MAC; import org.netling.ssh.transport.random.Random; import org.netling.ssh.userauth.keyprovider.FileKeyProvider; /** * Holds configuration information and factories. Acts a container for factories of {@link KeyExchange}, {@link Cipher}, * {@link Compression}, {@link MAC}, {@link Signature}, {@link Random}, and {@link FileKeyProvider}. */ public interface Config { /** * Retrieve the list of named factories for {@code Cipher}. * * @return a list of named {@code Cipher} factories */ List<Factory.Named<Cipher>> getCipherFactories(); /** * Retrieve the list of named factories for {@code Compression}. * * @return a list of named {@code Compression} factories */ List<Factory.Named<Compression>> getCompressionFactories(); /** * Retrieve the list of named factories for {@code FileKeyProvider}. * * @return a list of named {@code FileKeyProvider} factories */ List<Factory.Named<FileKeyProvider>> getFileKeyProviderFactories(); /** * Retrieve the list of named factories for <code>KeyExchange</code>. * * @return a list of named <code>KeyExchange</code> factories */ List<Factory.Named<KeyExchange>> getKeyExchangeFactories(); /** * Retrieve the list of named factories for <code>MAC</code>. * * @return a list of named <code>MAC</code> factories */ List<Factory.Named<MAC>> getMACFactories(); /** * Retrieve the {@link Random} factory. * * @return the {@link Random} factory */ Factory<Random> getRandomFactory(); /** * Retrieve the list of named factories for {@link Signature} * * @return a list of named {@link Signature} factories */ List<Factory.Named<Signature>> getSignatureFactories(); /** * Returns the software version information for identification during SSH connection initialization. For example, * {@code "NET_3_0"}. */ String getVersion(); /** * Set the named factories for {@link Cipher}. * * @param cipherFactories a list of named factories */ void setCipherFactories(List<Factory.Named<Cipher>> cipherFactories); /** * Set the named factories for {@link Compression}. * * @param compressionFactories a list of named factories */ void setCompressionFactories(List<Factory.Named<Compression>> compressionFactories); /** * Set the named factories for {@link FileKeyProvider}. * * @param fileKeyProviderFactories a list of named factories */ void setFileKeyProviderFactories(List<Factory.Named<FileKeyProvider>> fileKeyProviderFactories); /** * Set the named factories for {@link KeyExchange}. * * @param kexFactories a list of named factories */ void setKeyExchangeFactories(List<Factory.Named<KeyExchange>> kexFactories); /** * Set the named factories for {@link MAC}. * * @param macFactories a list of named factories */ void setMACFactories(List<Factory.Named<MAC>> macFactories); /** * Set the factory for {@link Random}. * * @param randomFactory the factory */ void setRandomFactory(Factory<Random> randomFactory); /** * Set the named factories for {@link Signature}. * * @param signatureFactories a list of named factories */ void setSignatureFactories(List<Factory.Named<Signature>> signatureFactories); /** * Set the software version information for identification during SSH connection initialization. For example, {@code * "SSHJ_0_1"}. * * @param version software version info */ void setVersion(String version); }