Top Description Fields Constructors Methods
org.apache.sshd.common.keyprovider

public Class FileKeyPairProvider

extends AbstractResourceKeyPairProvider<Path>
Class Inheritance
Imports
java.io.IOException, java.nio.file.Path, java.security.GeneralSecurityException, .KeyPair, java.util.Arrays, .Collection, .Collections, .Objects, org.apache.sshd.common.session.SessionContext, org.apache.sshd.common.util.GenericUtils, org.apache.sshd.common.util.io.resource.IoResource, .PathResource

This host key provider loads private keys from the specified files. The loading is lazy - i.e., a file is not loaded until it is actually required. Once required though, its loaded KeyPair result is cached and not re-loaded.
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private Collection<? extends Path>

Constructor Summary

AccessConstructor and Description
public
public
public
public

Method Summary

Modifier and TypeMethod and Description
protected Iterable<KeyPair>
protected IoResource<Path>
public Collection<? extends Path>
public Iterable<KeyPair>
loadKeys(SessionContext
The SessionContext for invoking this load command - may be null if not invoked within a session context (e.g., offline tool or session unknown).
session
)

Implements org.apache.sshd.common.keyprovider.KeyIdentityProvider.loadKeys.

Load available keys.

public void
setPaths(Collection<? extends Path> paths)

Inherited from org.apache.sshd.common.keyprovider.AbstractResourceKeyPairProvider:
doLoadKeysdoLoadKeysgetPasswordFinderloadKeysopenKeyPairResourceresetCacheMapsetPasswordFinder

Field Detail

filesback to summary
private Collection<? extends Path> files

Constructor Detail

FileKeyPairProviderback to summary
public FileKeyPairProvider()
FileKeyPairProviderback to summary
public FileKeyPairProvider(Path path)
FileKeyPairProviderback to summary
public FileKeyPairProvider(Path... files)
FileKeyPairProviderback to summary
public FileKeyPairProvider(Collection<? extends Path> files)

Method Detail

doLoadKeysback to summary
protected Iterable<KeyPair> doLoadKeys(SessionContext session, Path resource) throws IOException, GeneralSecurityException

Overrides org.apache.sshd.common.keyprovider.AbstractResourceKeyPairProvider.doLoadKeys.

Annotations
@Override
getIoResourceback to summary
protected IoResource<Path> getIoResource(SessionContext session, Path resource)

Overrides org.apache.sshd.common.keyprovider.AbstractResourceKeyPairProvider.getIoResource.

Annotations
@Override
getPathsback to summary
public Collection<? extends Path> getPaths()
loadKeysback to summary
public Iterable<KeyPair> loadKeys(SessionContext session)

Implements org.apache.sshd.common.keyprovider.KeyIdentityProvider.loadKeys.

Doc from org.apache.sshd.common.keyprovider.KeyIdentityProvider.loadKeys.

Load available keys.

Parameters
session:SessionContext

The SessionContext for invoking this load command - may be null if not invoked within a session context (e.g., offline tool or session unknown).

Returns:Iterable<KeyPair>

an Iterable instance of available keys - ignored if null

Annotations
@Override
setPathsback to summary
public void setPaths(Collection<? extends Path> paths)