Top Fields Constructors Methods
org.apache.sshd.client.auth.pubkey

public Class UserAuthPublicKeyIterator

extends AbstractKeyPairIterator<PublicKeyIdentity>
implements Channel
Class Inheritance
All Implemented Interfaces
java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable
Imports
java.io.IOException, java.nio.channels.Channel, java.security.GeneralSecurityException, .KeyPair, .PublicKey, java.util.ArrayList, .Collection, .Collections, .Iterator, .Map, .NoSuchElementException, .Objects, java.util.concurrent.atomic.AtomicBoolean, .AtomicReference, org.apache.sshd.agent.SshAgent, .SshAgentFactory, org.apache.sshd.client.session.ClientSession, org.apache.sshd.common.FactoryManager, org.apache.sshd.common.keyprovider.KeyIdentityProvider, org.apache.sshd.common.signature.SignatureFactoriesManager, org.apache.sshd.common.util.helper.LazyIterablesConcatenator, .LazyMatchingTypeIterator

Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private SshAgent
private Iterator<? extends PublicKeyIdentity>
private final AtomicBoolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.nio.channels.Channel.close.

Closes this channel.

protected void
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

protected Iterable<KeyAgentIdentity>
protected Iterable<KeyPairIdentity>
public boolean
isOpen()

Implements java.nio.channels.Channel.isOpen.

Tells whether or not this channel is open.

public PublicKeyIdentity
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

Inherited from org.apache.sshd.client.auth.pubkey.AbstractKeyPairIterator:
getClientSessiongetSessionremovetoString

Field Detail

agentback to summary
private SshAgent agent
currentback to summary
private Iterator<? extends PublicKeyIdentity> current
openback to summary
private final AtomicBoolean open

Constructor Detail

UserAuthPublicKeyIteratorback to summary
public UserAuthPublicKeyIterator(ClientSession session, SignatureFactoriesManager signatureFactories) throws Exception

Method Detail

closeback to summary
public void close() throws IOException

Implements java.nio.channels.Channel.close.

Doc from java.nio.channels.Channel.close.

Closes this channel.

After a channel is closed, any further attempt to invoke I/O operations upon it will cause a ClosedChannelException to be thrown.

If this channel is already closed then invoking this method has no effect.

This method may be invoked at any time. If some other thread has already invoked it, however, then another invocation will block until the first invocation is complete, after which it will return without effect.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
closeAgentback to summary
protected void closeAgent() throws IOException
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
initializeAgentIdentitiesback to summary
protected Iterable<KeyAgentIdentity> initializeAgentIdentities(ClientSession session) throws IOException
initializeSessionIdentitiesback to summary
protected Iterable<KeyPairIdentity> initializeSessionIdentities(ClientSession session, SignatureFactoriesManager signatureFactories)
Annotations
@SuppressWarnings:checkstyle:anoninnerlength
isOpenback to summary
public boolean isOpen()

Implements java.nio.channels.Channel.isOpen.

Doc from java.nio.channels.Channel.isOpen.

Tells whether or not this channel is open.

Returns:boolean

true if, and only if, this channel is open

Annotations
@Override
nextback to summary
public PublicKeyIdentity next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:PublicKeyIdentity

the next element in the iteration

Annotations
@Override