public class UserInfoPrompter extends Object implements com.jcraft.jsch.UserInfo, com.jcraft.jsch.UIKeyboardInteractive
UserInfo
prompter implementation that can be used when connecting a
Session
.
Clients may instantiate or subclass this class.
Constructor and Description |
---|
UserInfoPrompter(com.jcraft.jsch.Session session)
Create a prompter for the given session.
|
Modifier and Type | Method and Description |
---|---|
String |
getPassphrase() |
String |
getPassword() |
com.jcraft.jsch.Session |
getSession()
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) |
public UserInfoPrompter(com.jcraft.jsch.Session session)
Session.setUserInfo(UserInfo)
.session
- the sessionpublic com.jcraft.jsch.Session getSession()
public String getPassphrase()
getPassphrase
in interface com.jcraft.jsch.UserInfo
public String getPassword()
getPassword
in interface com.jcraft.jsch.UserInfo
public void setPassphrase(String passphrase)
null
if the pass phrase is not known.passphrase
- the pass phrase to be used when connecting the session or
null
public void setPassword(String password)
null
if the password is not known.password
- the password to be used when connecting the session or
null
public boolean promptPassphrase(String message)
promptPassphrase
in interface com.jcraft.jsch.UserInfo
public boolean promptPassword(String message)
promptPassword
in interface com.jcraft.jsch.UserInfo
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt, boolean[] echo)
promptKeyboardInteractive
in interface com.jcraft.jsch.UIKeyboardInteractive
public boolean promptYesNo(String question)
promptYesNo
in interface com.jcraft.jsch.UserInfo
public void showMessage(String message)
showMessage
in interface com.jcraft.jsch.UserInfo
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.