|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.event.WindowAdapter
examples.BasicClient
Ssh2 client which opens a terminal window and asks the user where to connect to.
Usage:
java -cp examples.jar examples.BasicClient
[props_file_name]
Username and password as well as server can be stored in the properties file.
It can also read portforwards from properties. Create properties named 'localN' or 'remoteN' where N is an integer 0-31. The contents of the properties is in the following format:
[/plugin/][local_host:]local_port:remote_host:remote_portThis client understands the
ftp and sniff
plugins.
SSH2FTPProxyFilter,
SSH2StreamSniffer| Constructor Summary | |
BasicClient(java.util.Properties props)
Simple constructor where all required properties have good default values so no properties have to be provided. |
|
| Method Summary | |
void |
close(TerminalMenuHandler origMenu)
Called when the user has selected close in the menu |
void |
doClose()
Close the connection to the server (if any) in a controlled way. |
int |
getExitStatus()
Get the exit status from the SSH2ConsoleRemote instance |
static void |
main(java.lang.String[] argv)
Run the application |
static java.lang.Object[] |
parseForwardSpec(java.lang.String spec,
java.lang.String listenAddr)
Parse a portforward specification string |
void |
run()
Actually runs the client. |
void |
update()
Called when the menu is updated |
void |
windowClosing(java.awt.event.WindowEvent e)
Overide corresponding function in java.awt.event.WindowAdapter |
| Methods inherited from class java.awt.event.WindowAdapter |
windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasicClient(java.util.Properties props)
props - SSH2 protocol properties.| Method Detail |
public void run()
main function.
run in interface java.lang.Runnablepublic int getExitStatus()
public static java.lang.Object[] parseForwardSpec(java.lang.String spec,
java.lang.String listenAddr)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic void doClose()
public void windowClosing(java.awt.event.WindowEvent e)
windowClosing in interface java.awt.event.WindowListenerpublic void close(TerminalMenuHandler origMenu)
TerminalMenuListener
close in interface TerminalMenuListenerorigMenu - the menu where close was selectedpublic void update()
TerminalMenuListener
update in interface TerminalMenuListenerpublic static void main(java.lang.String[] argv)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||