PageRenderTime 52ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/api/org/gjt/sp/jedit/EditServer.html

#
HTML | 347 lines | 296 code | 39 blank | 12 comment | 0 complexity | 682fa873b6786bae5e03c4d8981b465b MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.5.0_14) on Tue Jul 22 07:13:45 GMT-08:00 2008 -->
  6. <TITLE>
  7. EditServer (jEdit API)
  8. </TITLE>
  9. <META NAME="keywords" CONTENT="org.gjt.sp.jedit.EditServer class">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
  11. <NOSCRIPT>
  12. </NOSCRIPT>
  13. </HEAD>
  14. <BODY BGCOLOR="white" >
  15. <!-- ========= START OF TOP NAVBAR ======= -->
  16. <A NAME="navbar_top"><!-- --></A>
  17. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  18. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  19. <TR>
  20. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  21. <A NAME="navbar_top_firstrow"><!-- --></A>
  22. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  23. <TR ALIGN="center" VALIGN="top">
  24. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  25. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  26. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  27. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/EditServer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  28. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  29. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  30. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  31. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  32. </TR>
  33. </TABLE>
  34. </TD>
  35. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  36. </EM>
  37. </TD>
  38. </TR>
  39. <TR>
  40. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  41. &nbsp;<A HREF="../../../../org/gjt/sp/jedit/EditPlugin.Deferred.html" title="class in org.gjt.sp.jedit"><B>PREV CLASS</B></A>&nbsp;
  42. &nbsp;<A HREF="../../../../org/gjt/sp/jedit/GUIUtilities.html" title="class in org.gjt.sp.jedit"><B>NEXT CLASS</B></A></FONT></TD>
  43. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  44. <A HREF="../../../../index.html?org/gjt/sp/jedit/EditServer.html" target="_top"><B>FRAMES</B></A> &nbsp;
  45. &nbsp;<A HREF="EditServer.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  46. &nbsp;
  47. <NOSCRIPT>
  48. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  49. </NOSCRIPT>
  50. </FONT></TD>
  51. </TR>
  52. <TR>
  53. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  54. SUMMARY:&nbsp;<A HREF="#nested_classes_inherited_from_class_java.lang.Thread">NESTED</A>&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_java.lang.Thread">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  55. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  56. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  57. </TR>
  58. </TABLE>
  59. <A NAME="skip-navbar_top"></A>
  60. <!-- ========= END OF TOP NAVBAR ========= -->
  61. <HR>
  62. <!-- ======== START OF CLASS DATA ======== -->
  63. <H2>
  64. <FONT SIZE="-1">
  65. org.gjt.sp.jedit</FONT>
  66. <BR>
  67. Class EditServer</H2>
  68. <PRE>
  69. java.lang.Object
  70. <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">java.lang.Thread
  71. <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.jedit.EditServer</B>
  72. </PRE>
  73. <DL>
  74. <DT><B>All Implemented Interfaces:</B> <DD>java.lang.Runnable</DD>
  75. </DL>
  76. <HR>
  77. <DL>
  78. <DT><PRE>public class <B>EditServer</B><DT>extends java.lang.Thread</DL>
  79. </PRE>
  80. <P>
  81. Inter-process communication.<p>
  82. The edit server protocol is very simple. <code>$HOME/.jedit/server</code>
  83. is an ASCII file containing two lines, the first being the port number,
  84. the second being the authorization key.<p>
  85. You connect to that port on the local machine, sending the authorization
  86. key as four bytes in network byte order, followed by the length of the
  87. BeanShell script as two bytes in network byte order, followed by the
  88. script in UTF8 encoding. After the socked is closed, the BeanShell script
  89. will be executed by jEdit.<p>
  90. The snippet is executed in the AWT thread. None of the usual BeanShell
  91. variables (view, buffer, textArea, editPane) are set so the script has to
  92. figure things out by itself.<p>
  93. In most cases, the script will call the static
  94. <A HREF="../../../../org/gjt/sp/jedit/EditServer.html#handleClient(boolean, java.lang.String, java.lang.String[])"><CODE>handleClient(boolean,String,String[])</CODE></A> method, but of course more
  95. complicated stuff can be done too.
  96. <P>
  97. <P>
  98. <HR>
  99. <P>
  100. <!-- ======== NESTED CLASS SUMMARY ======== -->
  101. <A NAME="nested_class_summary"><!-- --></A>
  102. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  103. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  104. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  105. <B>Nested Class Summary</B></FONT></TH>
  106. </TR>
  107. </TABLE>
  108. &nbsp;<A NAME="nested_classes_inherited_from_class_java.lang.Thread"><!-- --></A>
  109. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  110. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  111. <TH ALIGN="left"><B>Nested classes/interfaces inherited from class java.lang.Thread</B></TH>
  112. </TR>
  113. <TR BGCOLOR="white" CLASS="TableRowColor">
  114. <TD><CODE>java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler</CODE></TD>
  115. </TR>
  116. </TABLE>
  117. &nbsp;
  118. <!-- =========== FIELD SUMMARY =========== -->
  119. <A NAME="field_summary"><!-- --></A>
  120. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  121. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  122. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  123. <B>Field Summary</B></FONT></TH>
  124. </TR>
  125. </TABLE>
  126. &nbsp;<A NAME="fields_inherited_from_class_java.lang.Thread"><!-- --></A>
  127. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  128. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  129. <TH ALIGN="left"><B>Fields inherited from class java.lang.Thread</B></TH>
  130. </TR>
  131. <TR BGCOLOR="white" CLASS="TableRowColor">
  132. <TD><CODE>MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY</CODE></TD>
  133. </TR>
  134. </TABLE>
  135. &nbsp;
  136. <!-- ========== METHOD SUMMARY =========== -->
  137. <A NAME="method_summary"><!-- --></A>
  138. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  139. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  140. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  141. <B>Method Summary</B></FONT></TH>
  142. </TR>
  143. <TR BGCOLOR="white" CLASS="TableRowColor">
  144. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  145. <CODE>&nbsp;int</CODE></FONT></TD>
  146. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditServer.html#getPort()">getPort</A></B>()</CODE>
  147. <BR>
  148. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  149. </TR>
  150. <TR BGCOLOR="white" CLASS="TableRowColor">
  151. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  152. <CODE>static&nbsp;<A HREF="../../../../org/gjt/sp/jedit/Buffer.html" title="class in org.gjt.sp.jedit">Buffer</A></CODE></FONT></TD>
  153. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditServer.html#handleClient(boolean, boolean, boolean, java.lang.String, java.lang.String[])">handleClient</A></B>(boolean&nbsp;restore,
  154. boolean&nbsp;newView,
  155. boolean&nbsp;newPlainView,
  156. java.lang.String&nbsp;parent,
  157. java.lang.String[]&nbsp;args)</CODE>
  158. <BR>
  159. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  160. </TR>
  161. <TR BGCOLOR="white" CLASS="TableRowColor">
  162. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  163. <CODE>static&nbsp;void</CODE></FONT></TD>
  164. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditServer.html#handleClient(boolean, java.lang.String, java.lang.String[])">handleClient</A></B>(boolean&nbsp;restore,
  165. java.lang.String&nbsp;parent,
  166. java.lang.String[]&nbsp;args)</CODE>
  167. <BR>
  168. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  169. </TR>
  170. <TR BGCOLOR="white" CLASS="TableRowColor">
  171. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  172. <CODE>&nbsp;void</CODE></FONT></TD>
  173. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditServer.html#run()">run</A></B>()</CODE>
  174. <BR>
  175. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  176. </TR>
  177. </TABLE>
  178. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Thread"><!-- --></A>
  179. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  180. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  181. <TH ALIGN="left"><B>Methods inherited from class java.lang.Thread</B></TH>
  182. </TR>
  183. <TR BGCOLOR="white" CLASS="TableRowColor">
  184. <TD><CODE>activeCount, checkAccess, 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</CODE></TD>
  185. </TR>
  186. </TABLE>
  187. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  188. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  189. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  190. <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
  191. </TR>
  192. <TR BGCOLOR="white" CLASS="TableRowColor">
  193. <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
  194. </TR>
  195. </TABLE>
  196. &nbsp;
  197. <P>
  198. <!-- ============ METHOD DETAIL ========== -->
  199. <A NAME="method_detail"><!-- --></A>
  200. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  201. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  202. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  203. <B>Method Detail</B></FONT></TH>
  204. </TR>
  205. </TABLE>
  206. <A NAME="run()"><!-- --></A><H3>
  207. run</H3>
  208. <PRE>
  209. public void <B>run</B>()</PRE>
  210. <DL>
  211. <DD><DL>
  212. <DT><B>Specified by:</B><DD><CODE>run</CODE> in interface <CODE>java.lang.Runnable</CODE><DT><B>Overrides:</B><DD><CODE>run</CODE> in class <CODE>java.lang.Thread</CODE></DL>
  213. </DD>
  214. <DD><DL>
  215. </DL>
  216. </DD>
  217. </DL>
  218. <HR>
  219. <A NAME="handleClient(boolean, java.lang.String, java.lang.String[])"><!-- --></A><H3>
  220. handleClient</H3>
  221. <PRE>
  222. public static void <B>handleClient</B>(boolean&nbsp;restore,
  223. java.lang.String&nbsp;parent,
  224. java.lang.String[]&nbsp;args)</PRE>
  225. <DL>
  226. <DD><DL>
  227. <DT><B>Parameters:</B><DD><CODE>restore</CODE> - Ignored unless no views are open<DD><CODE>parent</CODE> - The client's parent directory<DD><CODE>args</CODE> - A list of files. Null entries are ignored, for convinience<DT><B>Since:</B></DT>
  228. <DD>jEdit 3.2pre7</DD>
  229. </DL>
  230. </DD>
  231. </DL>
  232. <HR>
  233. <A NAME="handleClient(boolean, boolean, boolean, java.lang.String, java.lang.String[])"><!-- --></A><H3>
  234. handleClient</H3>
  235. <PRE>
  236. public static <A HREF="../../../../org/gjt/sp/jedit/Buffer.html" title="class in org.gjt.sp.jedit">Buffer</A> <B>handleClient</B>(boolean&nbsp;restore,
  237. boolean&nbsp;newView,
  238. boolean&nbsp;newPlainView,
  239. java.lang.String&nbsp;parent,
  240. java.lang.String[]&nbsp;args)</PRE>
  241. <DL>
  242. <DD><DL>
  243. <DT><B>Parameters:</B><DD><CODE>restore</CODE> - Ignored unless no views are open<DD><CODE>newView</CODE> - Open a new view?<DD><CODE>newPlainView</CODE> - Open a new plain view?<DD><CODE>parent</CODE> - The client's parent directory<DD><CODE>args</CODE> - A list of files. Null entries are ignored, for convinience<DT><B>Since:</B></DT>
  244. <DD>jEdit 4.2pre1</DD>
  245. </DL>
  246. </DD>
  247. </DL>
  248. <HR>
  249. <A NAME="getPort()"><!-- --></A><H3>
  250. getPort</H3>
  251. <PRE>
  252. public int <B>getPort</B>()</PRE>
  253. <DL>
  254. <DD><DL>
  255. </DL>
  256. </DD>
  257. </DL>
  258. <!-- ========= END OF CLASS DATA ========= -->
  259. <HR>
  260. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  261. <A NAME="navbar_bottom"><!-- --></A>
  262. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  263. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  264. <TR>
  265. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  266. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  267. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  268. <TR ALIGN="center" VALIGN="top">
  269. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  270. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  271. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  272. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/EditServer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  273. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  274. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  275. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  276. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  277. </TR>
  278. </TABLE>
  279. </TD>
  280. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  281. </EM>
  282. </TD>
  283. </TR>
  284. <TR>
  285. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  286. &nbsp;<A HREF="../../../../org/gjt/sp/jedit/EditPlugin.Deferred.html" title="class in org.gjt.sp.jedit"><B>PREV CLASS</B></A>&nbsp;
  287. &nbsp;<A HREF="../../../../org/gjt/sp/jedit/GUIUtilities.html" title="class in org.gjt.sp.jedit"><B>NEXT CLASS</B></A></FONT></TD>
  288. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  289. <A HREF="../../../../index.html?org/gjt/sp/jedit/EditServer.html" target="_top"><B>FRAMES</B></A> &nbsp;
  290. &nbsp;<A HREF="EditServer.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  291. &nbsp;
  292. <NOSCRIPT>
  293. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  294. </NOSCRIPT>
  295. </FONT></TD>
  296. </TR>
  297. <TR>
  298. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  299. SUMMARY:&nbsp;<A HREF="#nested_classes_inherited_from_class_java.lang.Thread">NESTED</A>&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_java.lang.Thread">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  300. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  301. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  302. </TR>
  303. </TABLE>
  304. <A NAME="skip-navbar_bottom"></A>
  305. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  306. <HR>
  307. </BODY>
  308. </HTML>