Class UserAuthPublicKeyIterator
- java.lang.Object
-
- org.apache.sshd.client.auth.pubkey.AbstractKeyPairIterator<PublicKeyIdentity>
-
- org.apache.sshd.client.auth.pubkey.UserAuthPublicKeyIterator
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.nio.channels.Channel
,java.util.Iterator<PublicKeyIdentity>
,ClientSessionHolder
,SessionContextHolder
,SessionHolder<ClientSession>
public class UserAuthPublicKeyIterator extends AbstractKeyPairIterator<PublicKeyIdentity> implements java.nio.channels.Channel
-
-
Field Summary
Fields Modifier and Type Field Description private SshAgent
agent
private java.util.Iterator<? extends PublicKeyIdentity>
current
private java.util.concurrent.atomic.AtomicBoolean
open
-
Constructor Summary
Constructors Constructor Description UserAuthPublicKeyIterator(ClientSession session, SignatureFactoriesManager signatureFactories)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected void
closeAgent()
boolean
hasNext()
protected java.lang.Iterable<KeyAgentIdentity>
initializeAgentIdentities(ClientSession session)
protected java.lang.Iterable<KeyPairIdentity>
initializeSessionIdentities(ClientSession session, SignatureFactoriesManager signatureFactories)
boolean
isOpen()
PublicKeyIdentity
next()
-
Methods inherited from class org.apache.sshd.client.auth.pubkey.AbstractKeyPairIterator
getClientSession, getSession, remove, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
-
-
-
Field Detail
-
open
private final java.util.concurrent.atomic.AtomicBoolean open
-
current
private java.util.Iterator<? extends PublicKeyIdentity> current
-
agent
private SshAgent agent
-
-
Constructor Detail
-
UserAuthPublicKeyIterator
public UserAuthPublicKeyIterator(ClientSession session, SignatureFactoriesManager signatureFactories) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-
Method Detail
-
initializeSessionIdentities
protected java.lang.Iterable<KeyPairIdentity> initializeSessionIdentities(ClientSession session, SignatureFactoriesManager signatureFactories)
-
initializeAgentIdentities
protected java.lang.Iterable<KeyAgentIdentity> initializeAgentIdentities(ClientSession session) throws java.io.IOException
- Throws:
java.io.IOException
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<PublicKeyIdentity>
-
next
public PublicKeyIdentity next()
- Specified by:
next
in interfacejava.util.Iterator<PublicKeyIdentity>
-
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interfacejava.nio.channels.Channel
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.nio.channels.Channel
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
closeAgent
protected void closeAgent() throws java.io.IOException
- Throws:
java.io.IOException
-
-