|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.starlink.table.jdbc.TerminalAuthenticator
public class TerminalAuthenticator
Provides JDBC authentication using the terminal; assumes that someone is sitting at System.in.
| Constructor Summary | |
|---|---|
TerminalAuthenticator()
Constructs a new authenticator which uses System.err for prompting. |
|
TerminalAuthenticator(PrintStream promptStrm)
Constructs a new authenticator with a given stream to use for writing prompts. |
|
| Method Summary | |
|---|---|
String[] |
authenticate()
Obtains username and password. |
String |
readPassword()
Prompts to the prompt stream and reads the password from standard input. |
String |
readUser()
Prompts to the prompt stream and reads the user name from standard input. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TerminalAuthenticator(PrintStream promptStrm)
promptStrm - output stream for promptingpublic TerminalAuthenticator()
| Method Detail |
|---|
public String[] authenticate()
throws IOException
JDBCAuthenticator
authenticate in interface JDBCAuthenticatorIOException - if there is some error
public String readUser()
throws IOException
IOException
public String readPassword()
throws IOException
IOException
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||