Package org.eclipse.jgit.transport.sshd
Class IdentityPasswordProvider.State
java.lang.Object
org.eclipse.jgit.transport.sshd.IdentityPasswordProvider.State
- Enclosing class:
IdentityPasswordProvider
A simple state object for repeated attempts to get a password for a
resource.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getCount()
Obtains the current count.char[]
Retrieves the password from the current attempt.int
incCount()
Increments the current count.void
setPassword
(char[] password) Remembers the password.
-
Field Details
-
count
private int count -
password
private char[] password
-
-
Constructor Details
-
State
protected State()
-
-
Method Details
-
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
-