Class AbstractResourceKeyPairProvider<R>
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.common.keyprovider.AbstractKeyPairProvider
-
- org.apache.sshd.common.keyprovider.AbstractResourceKeyPairProvider<R>
-
- Type Parameters:
R
- Type of resource from which theKeyPair
is generated
- All Implemented Interfaces:
KeyIdentityProvider
,KeyPairProvider
- Direct Known Subclasses:
ClassLoadableResourceKeyPairProvider
,FileKeyPairProvider
public abstract class AbstractResourceKeyPairProvider<R> extends AbstractKeyPairProvider
- Author:
- Apache MINA SSHD Project
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractResourceKeyPairProvider.KeyPairIterator
-
Field Summary
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Fields inherited from interface org.apache.sshd.common.keyprovider.KeyIdentityProvider
EMPTY_KEYS_PROVIDER
-
Fields inherited from interface org.apache.sshd.common.keyprovider.KeyPairProvider
ECDSA_SHA2_NISTP256, ECDSA_SHA2_NISTP384, ECDSA_SHA2_NISTP521, EMPTY_KEYPAIR_PROVIDER, SSH_DSS, SSH_ED25519, SSH_RSA
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractResourceKeyPairProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Iterable<KeyPair>
doLoadKeys(SessionContext session, NamedResource resourceKey, InputStream inputStream, FilePasswordProvider provider)
protected Iterable<KeyPair>
doLoadKeys(SessionContext session, NamedResource resourceKey, R resource, FilePasswordProvider provider)
protected Iterable<KeyPair>
doLoadKeys(SessionContext session, R resource)
protected IoResource<?>
getIoResource(SessionContext session, R resource)
FilePasswordProvider
getPasswordFinder()
protected Iterable<KeyPair>
loadKeys(SessionContext session, Collection<? extends R> resources)
protected InputStream
openKeyPairResource(SessionContext session, NamedResource resourceKey, R resource)
protected void
resetCacheMap(Collection<?> resources)
Checks which of the new resources we already loaded and can keep the associated key pairvoid
setPasswordFinder(FilePasswordProvider passwordFinder)
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
getSimplifiedLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.keyprovider.KeyIdentityProvider
loadKeys
-
Methods inherited from interface org.apache.sshd.common.keyprovider.KeyPairProvider
getKeyTypes, loadKey
-
-
-
-
Method Detail
-
getPasswordFinder
public FilePasswordProvider getPasswordFinder()
-
setPasswordFinder
public void setPasswordFinder(FilePasswordProvider passwordFinder)
-
resetCacheMap
protected void resetCacheMap(Collection<?> resources)
Checks which of the new resources we already loaded and can keep the associated key pair- Parameters:
resources
- The collection of new resources - can benull
/empty in which case the cache is cleared
-
loadKeys
protected Iterable<KeyPair> loadKeys(SessionContext session, Collection<? extends R> resources)
-
getIoResource
protected IoResource<?> getIoResource(SessionContext session, R resource)
-
doLoadKeys
protected Iterable<KeyPair> doLoadKeys(SessionContext session, R resource) throws IOException, GeneralSecurityException
- Throws:
IOException
GeneralSecurityException
-
doLoadKeys
protected Iterable<KeyPair> doLoadKeys(SessionContext session, NamedResource resourceKey, R resource, FilePasswordProvider provider) throws IOException, GeneralSecurityException
- Throws:
IOException
GeneralSecurityException
-
openKeyPairResource
protected InputStream openKeyPairResource(SessionContext session, NamedResource resourceKey, R resource) throws IOException
- Throws:
IOException
-
doLoadKeys
protected Iterable<KeyPair> doLoadKeys(SessionContext session, NamedResource resourceKey, InputStream inputStream, FilePasswordProvider provider) throws IOException, GeneralSecurityException
- Throws:
IOException
GeneralSecurityException
-
-