java.lang.Object
org.vrspace.util.Console
- All Implemented Interfaces:
- java.util.Observer, java.lang.Runnable
- public class Console
- extends java.lang.Object
- implements java.lang.Runnable, java.util.Observer
A simple console, able to connect to server.
Uses following properties to connect:
vrspace.host - default: localhost
vrspace.port - default: 8500
vrspace.login - default: guest
vrspace.password - default: guest
vrspace.command - command to execute & quit - default:none
Propmts on stdin for unset properties.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
host
public java.lang.String host
port
public int port
login
public java.lang.String login
password
public java.lang.String password
connection
public Connection connection
input
public java.io.BufferedReader input
output
public java.io.PrintStream output
Console
public Console()
main
public static void main(java.lang.String[] args)
print
public void print(java.lang.String s)
login
public void login()
attemptLogin
public void attemptLogin()
throws ConnectionException,
java.io.IOException
run
public void run()
- Description copied from interface:
java.lang.Runnable
- This method will be called by whoever wishes to run your class
implementing Runnable. Note that there are no restrictions on what
you are allowed to do in the run method, except that you cannot
throw a checked exception.
- Specified by:
run in interface java.lang.Runnable
update
public void update(java.util.Observable conn,
java.lang.Object arg)
- Description copied from interface:
java.util.Observer
- This method is called whenever the observable object changes, and has
called
notifyObservers. The Observable object can pass
arbitrary information in the second parameter.
- Specified by:
update in interface java.util.Observer