Class IdentityPasswordProvider.State

  • Enclosing class:
    IdentityPasswordProvider

    protected static class IdentityPasswordProvider.State
    extends java.lang.Object
    A simple state object for repeated attempts to get a password for a resource.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int count  
      private char[] password  
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • count

        private int count
      • password

        private char[] password
    • Constructor Detail

      • State

        protected State()
    • 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