edu.rice.cs.drjava
Class RemoteControlClient

java.lang.Object
  extended by edu.rice.cs.drjava.RemoteControlClient

public class RemoteControlClient
extends Object

Client class to remote control an already running instance of DrJava.


Field Summary
protected static boolean _serverRunning
          true if a DrJava remote control server is running.
protected static String _serverUser
          Contains the name of the user running the server, or is null if no server is running.
static int REMOTE_CONTROL_TIMEOUT
          Time in ms until the client decides the server is not running.
 
Constructor Summary
RemoteControlClient()
           
 
Method Summary
static String getServerUser()
          Return the name of the user running the server, or null if no server is running.
static boolean isServerRunning()
          Return true if a DrJava remote control server is running.
static void main(String[] args)
          Main method for test purposes.
static boolean openFile(File f)
          Tell the existing DrJava instance to open a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_serverRunning

protected static boolean _serverRunning
true if a DrJava remote control server is running.


_serverUser

protected static String _serverUser
Contains the name of the user running the server, or is null if no server is running.


REMOTE_CONTROL_TIMEOUT

public static final int REMOTE_CONTROL_TIMEOUT
Time in ms until the client decides the server is not running.

See Also:
Constant Field Values
Constructor Detail

RemoteControlClient

public RemoteControlClient()
Method Detail

isServerRunning

public static boolean isServerRunning()
Return true if a DrJava remote control server is running.

Returns:
true if running

getServerUser

public static String getServerUser()
Return the name of the user running the server, or null if no server is running.

Returns:
user name or null

openFile

public static boolean openFile(File f)
                        throws IOException
Tell the existing DrJava instance to open a file.

Parameters:
f - file, or null to just test if a server is running.
Returns:
true if file could be opened
Throws:
IOException

main

public static void main(String[] args)
Main method for test purposes.