Eclipse Platform
Release 4.2

org.eclipse.jsch.ui
Class UserInfoPrompter

java.lang.Object
  extended by org.eclipse.jsch.ui.UserInfoPrompter

public class UserInfoPrompter
extends Object

A UserInfo prompter implementation that can be used when connecting a Session.

Clients may instantiate or subclass this class.

Since:
1.0
See Also:
IJSchService.createSession(String, int, String), IJSchService.connect(Session, int, org.eclipse.core.runtime.IProgressMonitor)

Constructor Summary
UserInfoPrompter(Session session)
          Create a prompter for the given session.
 
Method Summary
 String getPassphrase()
           
 String getPassword()
           
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserInfoPrompter

public UserInfoPrompter(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 Session getSession()
Return the session to which this prompter is assigned.

Returns:
the session to which this prompter is assigned

getPassphrase

public String getPassphrase()

getPassword

public String getPassword()

setPassphrase

public void setPassphrase(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(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(String message)

promptPassword

public boolean promptPassword(String message)

promptKeyboardInteractive

public String[] promptKeyboardInteractive(String destination,
                                          String name,
                                          String instruction,
                                          String[] prompt,
                                          boolean[] echo)

promptYesNo

public boolean promptYesNo(String question)

showMessage

public void showMessage(String message)

Eclipse Platform
Release 4.2

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2012. All rights reserved.