Class UserInfoPrompter

    • Constructor Summary

      Constructors 
      Constructor Description
      UserInfoPrompter​(com.jcraft.jsch.Session session)
      Create a prompter for the given session.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getPassphrase()  
      java.lang.String getPassword()  
      com.jcraft.jsch.Session getSession()
      Return the session to which this prompter is assigned.
      java.lang.String[] promptKeyboardInteractive​(java.lang.String destination, java.lang.String name, java.lang.String instruction, java.lang.String[] prompt, boolean[] echo)  
      boolean promptPassphrase​(java.lang.String message)  
      boolean promptPassword​(java.lang.String message)  
      boolean promptYesNo​(java.lang.String question)  
      void setPassphrase​(java.lang.String passphrase)
      Set the pass phrase to be used when connecting the session.
      void setPassword​(java.lang.String password)
      Set the password to be used when connecting the session.
      void showMessage​(java.lang.String message)  
      • Methods inherited from class java.lang.Object

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

      • UserInfoPrompter

        public UserInfoPrompter​(com.jcraft.jsch.Session session)
        Create a prompter for the given session. This constructor will associate this prompter with the session using Session.setUserInfo(UserInfo).
        Parameters:
        session - the session
    • Method Detail

      • getSession

        public com.jcraft.jsch.Session getSession()
        Return the session to which this prompter is assigned.
        Returns:
        the session to which this prompter is assigned
      • getPassphrase

        public java.lang.String getPassphrase()
        Specified by:
        getPassphrase in interface com.jcraft.jsch.UserInfo
      • getPassword

        public java.lang.String getPassword()
        Specified by:
        getPassword in interface com.jcraft.jsch.UserInfo
      • setPassphrase

        public void setPassphrase​(java.lang.String passphrase)
        Set the pass phrase to be used when connecting the session. Return null if the pass phrase is not known.
        Parameters:
        passphrase - the pass phrase to be used when connecting the session or null
      • setPassword

        public void setPassword​(java.lang.String password)
        Set the password to be used when connecting the session. Return null if the password is not known.
        Parameters:
        password - the password to be used when connecting the session or null
      • promptPassphrase

        public boolean promptPassphrase​(java.lang.String message)
        Specified by:
        promptPassphrase in interface com.jcraft.jsch.UserInfo
      • promptPassword

        public boolean promptPassword​(java.lang.String message)
        Specified by:
        promptPassword in interface com.jcraft.jsch.UserInfo
      • promptKeyboardInteractive

        public java.lang.String[] promptKeyboardInteractive​(java.lang.String destination,
                                                            java.lang.String name,
                                                            java.lang.String instruction,
                                                            java.lang.String[] prompt,
                                                            boolean[] echo)
        Specified by:
        promptKeyboardInteractive in interface com.jcraft.jsch.UIKeyboardInteractive
      • promptYesNo

        public boolean promptYesNo​(java.lang.String question)
        Specified by:
        promptYesNo in interface com.jcraft.jsch.UserInfo
      • showMessage

        public void showMessage​(java.lang.String message)
        Specified by:
        showMessage in interface com.jcraft.jsch.UserInfo