PageRenderTime 104ms CodeModel.GetById 35ms RepoModel.GetById 5ms app.codeStats 0ms

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

#
HTML | 468 lines | 402 code | 53 blank | 13 comment | 0 complexity | 1b673ad43530cac4cadaa4cbf683fa0c 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:46 GMT-08:00 2008 -->
  6. <TITLE>
  7. ServiceManager (jEdit API)
  8. </TITLE>
  9. <META NAME="keywords" CONTENT="org.gjt.sp.jedit.ServiceManager 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/ServiceManager.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/RegistersListener.html" title="interface in org.gjt.sp.jedit"><B>PREV CLASS</B></A>&nbsp;
  42. &nbsp;<A HREF="../../../../org/gjt/sp/jedit/ServiceManager.ServiceFoldHandlerProvider.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/ServiceManager.html" target="_top"><B>FRAMES</B></A> &nbsp;
  45. &nbsp;<A HREF="ServiceManager.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_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&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;<A HREF="#constructor_detail">CONSTR</A>&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 ServiceManager</H2>
  68. <PRE>
  69. java.lang.Object
  70. <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.jedit.ServiceManager</B>
  71. </PRE>
  72. <HR>
  73. <DL>
  74. <DT><PRE>public class <B>ServiceManager</B><DT>extends java.lang.Object</DL>
  75. </PRE>
  76. <P>
  77. A generic way for plugins to provide various API extensions.<p>
  78. Services are loaded from files named <code>services.xml</code> inside the
  79. plugin JAR. A service definition file has the following form:
  80. <pre>&lt;?xml version="1.0"?&gt;
  81. &lt;!DOCTYPE SERVICES SYSTEM "services.dtd"&gt;
  82. &lt;SERVICES&gt;
  83. &lt;SERVICE NAME="service name" CLASS="fully qualified class name"&gt;
  84. // BeanShell code evaluated when the sevice is first activated
  85. &lt;/SERVICE&gt;
  86. &lt;/SERVICES&gt;</pre>
  87. The following elements are valid:
  88. <ul>
  89. <li>
  90. <code>SERVICES</code> is the top-level element and refers
  91. to the set of services offered by the plugin.
  92. </li>
  93. <li>
  94. A <code>SERVICE</code> contains the data for a particular service
  95. activation.
  96. It has two attributes, both required: <code>NAME</code> and
  97. <code>CLASS</code>. The <code>CLASS</code> attribute must be the name of
  98. a known sevice type; see below.
  99. </li>
  100. <li>
  101. A <code>SERVICE</code> element should the BeanShell code that returns a
  102. new instance of the named class. Note that this code can return
  103. <code>null</code>.
  104. </li>
  105. </ul>
  106. The jEdit core defines the following service types:
  107. <ul>
  108. <li><A HREF="../../../../org/gjt/sp/jedit/buffer/FoldHandler.html" title="class in org.gjt.sp.jedit.buffer"><CODE>FoldHandler</CODE></A></li>
  109. <li><A HREF="../../../../org/gjt/sp/jedit/io/VFS.html" title="class in org.gjt.sp.jedit.io"><CODE>VFS</CODE></A></li>
  110. <li><A HREF="../../../../org/gjt/sp/jedit/io/Encoding.html" title="interface in org.gjt.sp.jedit.io"><CODE>Encoding</CODE></A></li>
  111. <li><A HREF="../../../../org/gjt/sp/jedit/io/EncodingDetector.html" title="interface in org.gjt.sp.jedit.io"><CODE>EncodingDetector</CODE></A></li>
  112. </ul>
  113. Plugins may provide more.<p>
  114. To have your plugin accept services, no extra steps are needed other than
  115. a piece of code somewhere that calls <A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#getServiceNames(java.lang.String)"><CODE>getServiceNames(String)</CODE></A> and
  116. <A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#getService(java.lang.String, java.lang.String)"><CODE>getService(String,String)</CODE></A>.
  117. <P>
  118. <P>
  119. <DL>
  120. <DT><B>Since:</B></DT>
  121. <DD>jEdit 4.2pre1</DD>
  122. <DT><B>See Also:</B><DD><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html" title="class in org.gjt.sp.jedit"><CODE>BeanShell</CODE></A>,
  123. <A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit"><CODE>PluginJAR</CODE></A></DL>
  124. <HR>
  125. <P>
  126. <!-- ======== NESTED CLASS SUMMARY ======== -->
  127. <A NAME="nested_class_summary"><!-- --></A>
  128. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  129. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  130. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  131. <B>Nested Class Summary</B></FONT></TH>
  132. </TR>
  133. <TR BGCOLOR="white" CLASS="TableRowColor">
  134. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  135. <CODE>static&nbsp;class</CODE></FONT></TD>
  136. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.ServiceFoldHandlerProvider.html" title="class in org.gjt.sp.jedit">ServiceManager.ServiceFoldHandlerProvider</A></B></CODE>
  137. <BR>
  138. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A FoldHandler based on the ServiceManager</TD>
  139. </TR>
  140. </TABLE>
  141. &nbsp;
  142. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  143. <A NAME="constructor_summary"><!-- --></A>
  144. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  145. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  146. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  147. <B>Constructor Summary</B></FONT></TH>
  148. </TR>
  149. <TR BGCOLOR="white" CLASS="TableRowColor">
  150. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#ServiceManager()">ServiceManager</A></B>()</CODE>
  151. <BR>
  152. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  153. </TR>
  154. </TABLE>
  155. &nbsp;
  156. <!-- ========== METHOD SUMMARY =========== -->
  157. <A NAME="method_summary"><!-- --></A>
  158. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  159. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  160. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  161. <B>Method Summary</B></FONT></TH>
  162. </TR>
  163. <TR BGCOLOR="white" CLASS="TableRowColor">
  164. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  165. <CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
  166. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#getService(java.lang.String, java.lang.String)">getService</A></B>(java.lang.String&nbsp;clazz,
  167. java.lang.String&nbsp;name)</CODE>
  168. <BR>
  169. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an instance of the given service.</TD>
  170. </TR>
  171. <TR BGCOLOR="white" CLASS="TableRowColor">
  172. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  173. <CODE>static&nbsp;java.lang.String[]</CODE></FONT></TD>
  174. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#getServiceNames(java.lang.String)">getServiceNames</A></B>(java.lang.String&nbsp;clazz)</CODE>
  175. <BR>
  176. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the names of all registered services with the given
  177. class.</TD>
  178. </TR>
  179. <TR BGCOLOR="white" CLASS="TableRowColor">
  180. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  181. <CODE>static&nbsp;java.lang.String[]</CODE></FONT></TD>
  182. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#getServiceTypes()">getServiceTypes</A></B>()</CODE>
  183. <BR>
  184. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all known service class types.</TD>
  185. </TR>
  186. <TR BGCOLOR="white" CLASS="TableRowColor">
  187. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  188. <CODE>static&nbsp;void</CODE></FONT></TD>
  189. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#loadServices(org.gjt.sp.jedit.PluginJAR, java.net.URL, org.gjt.sp.jedit.PluginJAR.PluginCacheEntry)">loadServices</A></B>(<A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit">PluginJAR</A>&nbsp;plugin,
  190. java.net.URL&nbsp;uri,
  191. <A HREF="../../../../org/gjt/sp/jedit/PluginJAR.PluginCacheEntry.html" title="class in org.gjt.sp.jedit">PluginJAR.PluginCacheEntry</A>&nbsp;cache)</CODE>
  192. <BR>
  193. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads a <code>services.xml</code> file.</TD>
  194. </TR>
  195. <TR BGCOLOR="white" CLASS="TableRowColor">
  196. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  197. <CODE>static&nbsp;void</CODE></FONT></TD>
  198. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#registerService(java.lang.String, java.lang.String, java.lang.String, org.gjt.sp.jedit.PluginJAR)">registerService</A></B>(java.lang.String&nbsp;clazz,
  199. java.lang.String&nbsp;name,
  200. java.lang.String&nbsp;code,
  201. <A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit">PluginJAR</A>&nbsp;plugin)</CODE>
  202. <BR>
  203. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers a service.</TD>
  204. </TR>
  205. <TR BGCOLOR="white" CLASS="TableRowColor">
  206. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  207. <CODE>static&nbsp;void</CODE></FONT></TD>
  208. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#unloadServices(org.gjt.sp.jedit.PluginJAR)">unloadServices</A></B>(<A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit">PluginJAR</A>&nbsp;plugin)</CODE>
  209. <BR>
  210. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all services belonging to the specified plugin.</TD>
  211. </TR>
  212. <TR BGCOLOR="white" CLASS="TableRowColor">
  213. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  214. <CODE>static&nbsp;void</CODE></FONT></TD>
  215. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html#unregisterService(java.lang.String, java.lang.String)">unregisterService</A></B>(java.lang.String&nbsp;clazz,
  216. java.lang.String&nbsp;name)</CODE>
  217. <BR>
  218. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unregisters a service.</TD>
  219. </TR>
  220. </TABLE>
  221. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  222. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  223. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  224. <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
  225. </TR>
  226. <TR BGCOLOR="white" CLASS="TableRowColor">
  227. <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
  228. </TR>
  229. </TABLE>
  230. &nbsp;
  231. <P>
  232. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  233. <A NAME="constructor_detail"><!-- --></A>
  234. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  235. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  236. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  237. <B>Constructor Detail</B></FONT></TH>
  238. </TR>
  239. </TABLE>
  240. <A NAME="ServiceManager()"><!-- --></A><H3>
  241. ServiceManager</H3>
  242. <PRE>
  243. public <B>ServiceManager</B>()</PRE>
  244. <DL>
  245. </DL>
  246. <!-- ============ METHOD DETAIL ========== -->
  247. <A NAME="method_detail"><!-- --></A>
  248. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  249. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  250. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  251. <B>Method Detail</B></FONT></TH>
  252. </TR>
  253. </TABLE>
  254. <A NAME="loadServices(org.gjt.sp.jedit.PluginJAR, java.net.URL, org.gjt.sp.jedit.PluginJAR.PluginCacheEntry)"><!-- --></A><H3>
  255. loadServices</H3>
  256. <PRE>
  257. public static void <B>loadServices</B>(<A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit">PluginJAR</A>&nbsp;plugin,
  258. java.net.URL&nbsp;uri,
  259. <A HREF="../../../../org/gjt/sp/jedit/PluginJAR.PluginCacheEntry.html" title="class in org.gjt.sp.jedit">PluginJAR.PluginCacheEntry</A>&nbsp;cache)</PRE>
  260. <DL>
  261. <DD>Loads a <code>services.xml</code> file.
  262. <P>
  263. <DD><DL>
  264. <DT><B>Since:</B></DT>
  265. <DD>jEdit 4.2pre1</DD>
  266. </DL>
  267. </DD>
  268. </DL>
  269. <HR>
  270. <A NAME="unloadServices(org.gjt.sp.jedit.PluginJAR)"><!-- --></A><H3>
  271. unloadServices</H3>
  272. <PRE>
  273. public static void <B>unloadServices</B>(<A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit">PluginJAR</A>&nbsp;plugin)</PRE>
  274. <DL>
  275. <DD>Removes all services belonging to the specified plugin.
  276. <P>
  277. <DD><DL>
  278. <DT><B>Parameters:</B><DD><CODE>plugin</CODE> - The plugin<DT><B>Since:</B></DT>
  279. <DD>jEdit 4.2pre1</DD>
  280. </DL>
  281. </DD>
  282. </DL>
  283. <HR>
  284. <A NAME="registerService(java.lang.String, java.lang.String, java.lang.String, org.gjt.sp.jedit.PluginJAR)"><!-- --></A><H3>
  285. registerService</H3>
  286. <PRE>
  287. public static void <B>registerService</B>(java.lang.String&nbsp;clazz,
  288. java.lang.String&nbsp;name,
  289. java.lang.String&nbsp;code,
  290. <A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit">PluginJAR</A>&nbsp;plugin)</PRE>
  291. <DL>
  292. <DD>Registers a service. Plugins should provide a
  293. <code>services.xml</code> file instead of calling this directly.
  294. <P>
  295. <DD><DL>
  296. <DT><B>Parameters:</B><DD><CODE>clazz</CODE> - The service class<DD><CODE>name</CODE> - The service name<DD><CODE>code</CODE> - BeanShell code to create an instance of this<DD><CODE>plugin</CODE> - The plugin JAR, or null if this is a built-in service<DT><B>Since:</B></DT>
  297. <DD>jEdit 4.2pre1</DD>
  298. </DL>
  299. </DD>
  300. </DL>
  301. <HR>
  302. <A NAME="unregisterService(java.lang.String, java.lang.String)"><!-- --></A><H3>
  303. unregisterService</H3>
  304. <PRE>
  305. public static void <B>unregisterService</B>(java.lang.String&nbsp;clazz,
  306. java.lang.String&nbsp;name)</PRE>
  307. <DL>
  308. <DD>Unregisters a service.
  309. <P>
  310. <DD><DL>
  311. <DT><B>Parameters:</B><DD><CODE>clazz</CODE> - The service class<DD><CODE>name</CODE> - The service name<DT><B>Since:</B></DT>
  312. <DD>jEdit 4.2pre1</DD>
  313. </DL>
  314. </DD>
  315. </DL>
  316. <HR>
  317. <A NAME="getServiceTypes()"><!-- --></A><H3>
  318. getServiceTypes</H3>
  319. <PRE>
  320. public static java.lang.String[] <B>getServiceTypes</B>()</PRE>
  321. <DL>
  322. <DD>Returns all known service class types.
  323. <P>
  324. <DD><DL>
  325. <DT><B>Since:</B></DT>
  326. <DD>jEdit 4.2pre1</DD>
  327. </DL>
  328. </DD>
  329. </DL>
  330. <HR>
  331. <A NAME="getServiceNames(java.lang.String)"><!-- --></A><H3>
  332. getServiceNames</H3>
  333. <PRE>
  334. public static java.lang.String[] <B>getServiceNames</B>(java.lang.String&nbsp;clazz)</PRE>
  335. <DL>
  336. <DD>Returns the names of all registered services with the given
  337. class. For example, calling this with a parameter of
  338. "org.gjt.sp.jedit.io.VFS" returns all known virtual file
  339. systems.
  340. <P>
  341. <DD><DL>
  342. <DT><B>Parameters:</B><DD><CODE>clazz</CODE> - The class name<DT><B>Since:</B></DT>
  343. <DD>jEdit 4.2pre1</DD>
  344. </DL>
  345. </DD>
  346. </DL>
  347. <HR>
  348. <A NAME="getService(java.lang.String, java.lang.String)"><!-- --></A><H3>
  349. getService</H3>
  350. <PRE>
  351. public static java.lang.Object <B>getService</B>(java.lang.String&nbsp;clazz,
  352. java.lang.String&nbsp;name)</PRE>
  353. <DL>
  354. <DD>Returns an instance of the given service. The first time this is
  355. called for a given service, the BeanShell code is evaluated. The
  356. result is cached for future invocations, so in effect services are
  357. singletons.
  358. <P>
  359. <DD><DL>
  360. <DT><B>Parameters:</B><DD><CODE>clazz</CODE> - The service class<DD><CODE>name</CODE> - The service name<DT><B>Since:</B></DT>
  361. <DD>jEdit 4.2pre1</DD>
  362. </DL>
  363. </DD>
  364. </DL>
  365. <!-- ========= END OF CLASS DATA ========= -->
  366. <HR>
  367. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  368. <A NAME="navbar_bottom"><!-- --></A>
  369. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  370. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  371. <TR>
  372. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  373. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  374. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  375. <TR ALIGN="center" VALIGN="top">
  376. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  377. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  378. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  379. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ServiceManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  380. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  381. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  382. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  383. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  384. </TR>
  385. </TABLE>
  386. </TD>
  387. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  388. </EM>
  389. </TD>
  390. </TR>
  391. <TR>
  392. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  393. &nbsp;<A HREF="../../../../org/gjt/sp/jedit/RegistersListener.html" title="interface in org.gjt.sp.jedit"><B>PREV CLASS</B></A>&nbsp;
  394. &nbsp;<A HREF="../../../../org/gjt/sp/jedit/ServiceManager.ServiceFoldHandlerProvider.html" title="class in org.gjt.sp.jedit"><B>NEXT CLASS</B></A></FONT></TD>
  395. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  396. <A HREF="../../../../index.html?org/gjt/sp/jedit/ServiceManager.html" target="_top"><B>FRAMES</B></A> &nbsp;
  397. &nbsp;<A HREF="ServiceManager.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  398. &nbsp;
  399. <NOSCRIPT>
  400. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  401. </NOSCRIPT>
  402. </FONT></TD>
  403. </TR>
  404. <TR>
  405. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  406. SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  407. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  408. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  409. </TR>
  410. </TABLE>
  411. <A NAME="skip-navbar_bottom"></A>
  412. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  413. <HR>
  414. </BODY>
  415. </HTML>