public class EditServer
extends java.lang.Thread
The edit server protocol is very simple. $HOME/.jedit/server
is
an ASCII file containing two lines, the first being the port number, the
second being the authorization key.
You connect to that port on the local machine, sending the authorization key as four bytes in network byte order, followed by the length of the BeanShell script as two bytes in network byte order, followed by the script in UTF8 encoding. After the socked is closed, the BeanShell script will be executed by FreeMind.
The snippet is executed in the AWT thread. None of the usual BeanShell variables (view, buffer, textArea, editPane) are set so the script has to figure things out by itself.
In most cases, the script will call the static
#handleClient(boolean,String,String[])
method, but of course more
complicated stuff can be done too.
Modifier and Type | Field and Description |
---|---|
protected static java.util.logging.Logger |
logger |
Modifier and Type | Method and Description |
---|---|
int |
getPort() |
void |
run() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield