Package org.eclipse.jgit.transport.sshd
Class IdentityPasswordProvider.State
- java.lang.Object
-
- org.eclipse.jgit.transport.sshd.IdentityPasswordProvider.State
-
- Enclosing class:
- IdentityPasswordProvider
protected static class IdentityPasswordProvider.State extends Object
A simple state object for repeated attempts to get a password for a resource.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
State()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCount()
Obtains the current count.char[]
getPassword()
Retrieves the password from the current attempt.int
incCount()
Increments the current count.void
setPassword(char[] password)
Remembers the password.
-
-
-
Method Detail
-
getCount
public int getCount()
Obtains the current count. The initial count is zero.- Returns:
- the count
-
incCount
public int incCount()
Increments the current count. Should be called for each new attempt to get a password.- Returns:
- the incremented count.
-
setPassword
public void setPassword(char[] password)
Remembers the password.- Parameters:
password
- the password
-
getPassword
public char[] getPassword()
Retrieves the password from the current attempt.- Returns:
- the password, or
null
if none was obtained
-
-