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 Object
implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractive
A
UserInfo
prompter implementation that can be used when connecting a
Session
.
Clients may instantiate or subclass this class.
-
Constructor Summary
ConstructorDescriptionUserInfoPrompter
(com.jcraft.jsch.Session session) Create a prompter for the given session. -
Method Summary
Modifier and TypeMethodDescriptioncom.jcraft.jsch.Session
Return the session to which this prompter is assigned.String[]
promptKeyboardInteractive
(String destination, String name, String instruction, String[] prompt, boolean[] echo) boolean
promptPassphrase
(String message) boolean
promptPassword
(String message) boolean
promptYesNo
(String question) void
setPassphrase
(String passphrase) Set the pass phrase to be used when connecting the session.void
setPassword
(String password) Set the password to be used when connecting the session.void
showMessage
(String message)
-
Constructor Details
-
UserInfoPrompter
public UserInfoPrompter(com.jcraft.jsch.Session session) Create a prompter for the given session. This constructor will associate this prompter with the session usingSession.setUserInfo(UserInfo)
.- Parameters:
session
- the session
-
-
Method Details
-
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
- Specified by:
getPassphrase
in interfacecom.jcraft.jsch.UserInfo
-
getPassword
- Specified by:
getPassword
in interfacecom.jcraft.jsch.UserInfo
-
setPassphrase
Set the pass phrase to be used when connecting the session. Returnnull
if the pass phrase is not known.- Parameters:
passphrase
- the pass phrase to be used when connecting the session ornull
-
setPassword
Set the password to be used when connecting the session. Returnnull
if the password is not known.- Parameters:
password
- the password to be used when connecting the session ornull
-
promptPassphrase
- Specified by:
promptPassphrase
in interfacecom.jcraft.jsch.UserInfo
-
promptPassword
- Specified by:
promptPassword
in interfacecom.jcraft.jsch.UserInfo
-
promptKeyboardInteractive
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt, boolean[] echo) - Specified by:
promptKeyboardInteractive
in interfacecom.jcraft.jsch.UIKeyboardInteractive
-
promptYesNo
- Specified by:
promptYesNo
in interfacecom.jcraft.jsch.UserInfo
-
showMessage
- Specified by:
showMessage
in interfacecom.jcraft.jsch.UserInfo
-