Package org.eclipse.jsch.ui
Class UserInfoPrompter
- java.lang.Object
-
- org.eclipse.jsch.ui.UserInfoPrompter
-
- All Implemented Interfaces:
com.jcraft.jsch.UIKeyboardInteractive,com.jcraft.jsch.UserInfo
public class UserInfoPrompter extends java.lang.Object implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractiveAUserInfoprompter implementation that can be used when connecting aSession.Clients may instantiate or subclass this class.
-
-
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.StringgetPassphrase()java.lang.StringgetPassword()com.jcraft.jsch.SessiongetSession()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)booleanpromptPassphrase(java.lang.String message)booleanpromptPassword(java.lang.String message)booleanpromptYesNo(java.lang.String question)voidsetPassphrase(java.lang.String passphrase)Set the pass phrase to be used when connecting the session.voidsetPassword(java.lang.String password)Set the password to be used when connecting the session.voidshowMessage(java.lang.String message)
-
-
-
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:
getPassphrasein interfacecom.jcraft.jsch.UserInfo
-
getPassword
public java.lang.String getPassword()
- Specified by:
getPasswordin interfacecom.jcraft.jsch.UserInfo
-
setPassphrase
public void setPassphrase(java.lang.String passphrase)
Set the pass phrase to be used when connecting the session. Returnnullif the pass phrase is not known.- Parameters:
passphrase- the pass phrase to be used when connecting the session ornull
-
setPassword
public void setPassword(java.lang.String password)
Set the password to be used when connecting the session. Returnnullif the password is not known.- Parameters:
password- the password to be used when connecting the session ornull
-
promptPassphrase
public boolean promptPassphrase(java.lang.String message)
- Specified by:
promptPassphrasein interfacecom.jcraft.jsch.UserInfo
-
promptPassword
public boolean promptPassword(java.lang.String message)
- Specified by:
promptPasswordin interfacecom.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:
promptKeyboardInteractivein interfacecom.jcraft.jsch.UIKeyboardInteractive
-
promptYesNo
public boolean promptYesNo(java.lang.String question)
- Specified by:
promptYesNoin interfacecom.jcraft.jsch.UserInfo
-
showMessage
public void showMessage(java.lang.String message)
- Specified by:
showMessagein interfacecom.jcraft.jsch.UserInfo
-
-