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 theKeyPairis 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 classAbstractResourceKeyPairProvider.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_DSS_CERT, SSH_ECDSA_SHA2_NISTP256_CERT, SSH_ECDSA_SHA2_NISTP384_CERT, SSH_ECDSA_SHA2_NISTP521_CERT, SSH_ED25519, SSH_ED25519_CERT, SSH_RSA, SSH_RSA_CERT
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractResourceKeyPairProvider()
-
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)FilePasswordProvidergetPasswordFinder()protected Iterable<KeyPair>loadKeys(SessionContext session, Collection<? extends R> resources)protected InputStreamopenKeyPairResource(SessionContext session, NamedResource resourceKey, R resource)protected voidresetCacheMap(Collection<?> resources)Checks which of the new resources we already loaded and can keep the associated key pairvoidsetPasswordFinder(FilePasswordProvider passwordFinder)-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
-
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:
IOExceptionGeneralSecurityException
-
doLoadKeys
protected Iterable<KeyPair> doLoadKeys(SessionContext session, NamedResource resourceKey, R resource, FilePasswordProvider provider) throws IOException, GeneralSecurityException
- Throws:
IOExceptionGeneralSecurityException
-
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:
IOExceptionGeneralSecurityException
-
-