|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.RemoteControlServer
public final class RemoteControlServer
This class contains a server that monitors incoming datagrams on port 4444 (default; can be changed in OptionConstants.REMOTE_CONTROL_PORT). These datagrams can contain commands to open additional files. A client can query whether a server is running by sending QUERY_PREFIX. If a server is running, it will respond with RESPONSE_PREFIX. A client can tell a server to open a file by sending QUERY_PREFIX + " " + absoluteFileName. The server will respond with RESPONSE_PREFIX, or RESPONSE_PREFIX + " " + error if an error occurred. A client can tell a server to open a file and jump to a certain line number by sending QUERY_PREFIX + " " + absoluteFileName + File.pathSeparator + lineNumber. The server will respond with RESPONSE_PREFIX, or RESPONSE_PREFIX+" "+error if an error occurred. This class is declared final because it cannot be robustly subclassed because the constructor starts a thread.
| Nested Class Summary | |
|---|---|
static class |
RemoteControlServer.RCServerThread
Thread class for the server. |
| Field Summary | |
|---|---|
static String |
QUERY_PREFIX
Prefix of a legitimate query by a client. |
static String |
RESPONSE_PREFIX
Prefix of a legitimate response by this server. |
static String |
RESPONSE_PREFIX_WITH_USER
Prefix of a legitimate response by this server, including the user name. |
| Constructor Summary | |
|---|---|
RemoteControlServer(MainFrame frame)
Create a new remote control server, running in its own daemon thread. |
|
| Method Summary | |
|---|---|
static void |
main(String[] args)
Main method for test purposes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String QUERY_PREFIX
public static final String RESPONSE_PREFIX
public static final String RESPONSE_PREFIX_WITH_USER
| Constructor Detail |
|---|
public RemoteControlServer(MainFrame frame)
throws IOException
frame - main frame
IOException| Method Detail |
|---|
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||