triggerActions.exsd 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!-- Schema file written by PDE -->
  3. <schema targetNamespace="com.jrockit.mc.rjmx" xmlns="http://www.w3.org/2001/XMLSchema">
  4. <annotation>
  5. <appinfo>
  6. <meta.schema plugin="com.jrockit.mc.rjmx" id="triggerActions" name="Trigger Actions"/>
  7. </appinfo>
  8. <documentation>
  9. This extension point is used to add new trigger actions to the JMX Console.
  10. </documentation>
  11. </annotation>
  12. <element name="extension">
  13. <annotation>
  14. <appinfo>
  15. <meta.element />
  16. </appinfo>
  17. <documentation>
  18. A trigger action must have an id, name, description and a class that extends &lt;code&gt;com.jrockit.mc.rjmx.triggers.TriggerAction &lt;/code&gt;.
  19. It may also define settings of various types(string, file, boolean, integer, date or time) that can be configured in the JMX Console user interface.
  20. </documentation>
  21. </annotation>
  22. <complexType>
  23. <sequence>
  24. <element ref="triggerAction" minOccurs="1" maxOccurs="unbounded"/>
  25. </sequence>
  26. <attribute name="point" type="string" use="required">
  27. <annotation>
  28. <documentation>
  29. </documentation>
  30. </annotation>
  31. </attribute>
  32. <attribute name="id" type="string">
  33. <annotation>
  34. <documentation>
  35. </documentation>
  36. </annotation>
  37. </attribute>
  38. <attribute name="name" type="string">
  39. <annotation>
  40. <documentation>
  41. </documentation>
  42. </annotation>
  43. </attribute>
  44. </complexType>
  45. </element>
  46. <element name="triggerAction">
  47. <annotation>
  48. <appinfo>
  49. <meta.element labelAttribute="name" icon="icon"/>
  50. </appinfo>
  51. </annotation>
  52. <complexType>
  53. <sequence>
  54. <element ref="string" minOccurs="0" maxOccurs="unbounded"/>
  55. <element ref="file" minOccurs="0" maxOccurs="unbounded"/>
  56. <element ref="boolean" minOccurs="0" maxOccurs="unbounded"/>
  57. <element ref="integer" minOccurs="0" maxOccurs="unbounded"/>
  58. <element ref="date" minOccurs="0" maxOccurs="unbounded"/>
  59. <element ref="time" minOccurs="0" maxOccurs="unbounded"/>
  60. <element ref="float" minOccurs="0" maxOccurs="unbounded"/>
  61. <element ref="timerange" minOccurs="0" maxOccurs="unbounded"/>
  62. <element ref="password" minOccurs="0" maxOccurs="unbounded"/>
  63. </sequence>
  64. <attribute name="id" type="string" use="required">
  65. <annotation>
  66. <documentation>
  67. a unique identifier for this action.
  68. </documentation>
  69. </annotation>
  70. </attribute>
  71. <attribute name="name" type="string" use="required">
  72. <annotation>
  73. <documentation>
  74. the name of the action
  75. </documentation>
  76. <appinfo>
  77. <meta.attribute translatable="true"/>
  78. </appinfo>
  79. </annotation>
  80. </attribute>
  81. <attribute name="description" type="string" use="required">
  82. <annotation>
  83. <documentation>
  84. the description of the action
  85. </documentation>
  86. <appinfo>
  87. <meta.attribute translatable="true"/>
  88. </appinfo>
  89. </annotation>
  90. </attribute>
  91. <attribute name="icon" type="string">
  92. <annotation>
  93. <documentation>
  94. the icon for the action
  95. </documentation>
  96. <appinfo>
  97. <meta.attribute kind="resource"/>
  98. </appinfo>
  99. </annotation>
  100. </attribute>
  101. <attribute name="class" type="string" use="required">
  102. <annotation>
  103. <documentation>
  104. class that extends &lt;code&gt;com.jrockit.mc.rjmx.triggers.TriggerAction&lt;/code&gt; and that implements the method &lt;code&gt;handleNotificationEvent(NotificationEvent e)&lt;/code&gt; that will execute when a trigger is triggered.
  105. </documentation>
  106. <appinfo>
  107. <meta.attribute kind="java" basedOn="com.jrockit.mc.rjmx.triggers.TriggerAction"/>
  108. </appinfo>
  109. </annotation>
  110. </attribute>
  111. </complexType>
  112. </element>
  113. <element name="date">
  114. <annotation>
  115. <documentation>
  116. Date setting for a trigger action.
  117. </documentation>
  118. </annotation>
  119. <complexType>
  120. <attribute name="id" type="string" use="required">
  121. <annotation>
  122. <documentation>
  123. a unique identifier for this setting
  124. </documentation>
  125. </annotation>
  126. </attribute>
  127. <attribute name="name" type="string" use="required">
  128. <annotation>
  129. <documentation>
  130. the name of the setting
  131. </documentation>
  132. <appinfo>
  133. <meta.attribute translatable="true"/>
  134. </appinfo>
  135. </annotation>
  136. </attribute>
  137. <attribute name="description" type="string">
  138. <annotation>
  139. <documentation>
  140. the description of the setting
  141. </documentation>
  142. <appinfo>
  143. <meta.attribute translatable="true"/>
  144. </appinfo>
  145. </annotation>
  146. </attribute>
  147. <attribute name="value" type="string">
  148. <annotation>
  149. <documentation>
  150. the default value
  151. </documentation>
  152. </annotation>
  153. </attribute>
  154. <attribute name="preference" type="boolean">
  155. <annotation>
  156. <documentation>
  157. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  158. </documentation>
  159. </annotation>
  160. </attribute>
  161. </complexType>
  162. </element>
  163. <element name="time">
  164. <annotation>
  165. <documentation>
  166. Time setting for a trigger action.
  167. </documentation>
  168. </annotation>
  169. <complexType>
  170. <attribute name="id" type="string" use="required">
  171. <annotation>
  172. <documentation>
  173. a unique identifier for this setting
  174. </documentation>
  175. </annotation>
  176. </attribute>
  177. <attribute name="name" type="string" use="required">
  178. <annotation>
  179. <documentation>
  180. the name of the setting
  181. </documentation>
  182. <appinfo>
  183. <meta.attribute translatable="true"/>
  184. </appinfo>
  185. </annotation>
  186. </attribute>
  187. <attribute name="description" type="string">
  188. <annotation>
  189. <documentation>
  190. the description of the setting
  191. </documentation>
  192. <appinfo>
  193. <meta.attribute translatable="true"/>
  194. </appinfo>
  195. </annotation>
  196. </attribute>
  197. <attribute name="value" type="string">
  198. <annotation>
  199. <documentation>
  200. the default value
  201. </documentation>
  202. </annotation>
  203. </attribute>
  204. <attribute name="preference" type="boolean">
  205. <annotation>
  206. <documentation>
  207. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  208. </documentation>
  209. </annotation>
  210. </attribute>
  211. </complexType>
  212. </element>
  213. <element name="timerange">
  214. <annotation>
  215. <documentation>
  216. Time range setting for a trigger action.
  217. </documentation>
  218. </annotation>
  219. <complexType>
  220. <attribute name="id" type="string" use="required">
  221. <annotation>
  222. <documentation>
  223. a unique identifier for this setting
  224. </documentation>
  225. </annotation>
  226. </attribute>
  227. <attribute name="name" type="string" use="required">
  228. <annotation>
  229. <documentation>
  230. the name of the setting
  231. </documentation>
  232. <appinfo>
  233. <meta.attribute translatable="true"/>
  234. </appinfo>
  235. </annotation>
  236. </attribute>
  237. <attribute name="description" type="string">
  238. <annotation>
  239. <documentation>
  240. the description of the setting
  241. </documentation>
  242. <appinfo>
  243. <meta.attribute translatable="true"/>
  244. </appinfo>
  245. </annotation>
  246. </attribute>
  247. <attribute name="value" type="string">
  248. <annotation>
  249. <documentation>
  250. the default value for this time range. If no unit is set, seconds will be assumed.
  251. </documentation>
  252. </annotation>
  253. </attribute>
  254. <attribute name="preference" type="boolean">
  255. <annotation>
  256. <documentation>
  257. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  258. </documentation>
  259. </annotation>
  260. </attribute>
  261. </complexType>
  262. </element>
  263. <element name="string">
  264. <annotation>
  265. <documentation>
  266. String setting for a trigger action.
  267. </documentation>
  268. </annotation>
  269. <complexType>
  270. <attribute name="id" type="string" use="required">
  271. <annotation>
  272. <documentation>
  273. a unique identifier for this setting
  274. </documentation>
  275. </annotation>
  276. </attribute>
  277. <attribute name="name" type="string" use="required">
  278. <annotation>
  279. <documentation>
  280. the name of the setting
  281. </documentation>
  282. <appinfo>
  283. <meta.attribute translatable="true"/>
  284. </appinfo>
  285. </annotation>
  286. </attribute>
  287. <attribute name="description" type="string">
  288. <annotation>
  289. <documentation>
  290. the description of the setting
  291. </documentation>
  292. <appinfo>
  293. <meta.attribute translatable="true"/>
  294. </appinfo>
  295. </annotation>
  296. </attribute>
  297. <attribute name="value" type="string">
  298. <annotation>
  299. <documentation>
  300. the default value
  301. </documentation>
  302. </annotation>
  303. </attribute>
  304. <attribute name="preference" type="boolean">
  305. <annotation>
  306. <documentation>
  307. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  308. </documentation>
  309. </annotation>
  310. </attribute>
  311. </complexType>
  312. </element>
  313. <element name="file">
  314. <annotation>
  315. <documentation>
  316. File setting for a trigger action.
  317. </documentation>
  318. </annotation>
  319. <complexType>
  320. <attribute name="id" type="string" use="required">
  321. <annotation>
  322. <documentation>
  323. a unique identifier for this setting
  324. </documentation>
  325. </annotation>
  326. </attribute>
  327. <attribute name="name" type="string" use="required">
  328. <annotation>
  329. <documentation>
  330. the name of the setting
  331. </documentation>
  332. <appinfo>
  333. <meta.attribute translatable="true"/>
  334. </appinfo>
  335. </annotation>
  336. </attribute>
  337. <attribute name="description" type="string">
  338. <annotation>
  339. <documentation>
  340. the description of the setting
  341. </documentation>
  342. <appinfo>
  343. <meta.attribute translatable="true"/>
  344. </appinfo>
  345. </annotation>
  346. </attribute>
  347. <attribute name="value" type="string">
  348. <annotation>
  349. <documentation>
  350. the default value
  351. </documentation>
  352. </annotation>
  353. </attribute>
  354. <attribute name="preference" type="boolean">
  355. <annotation>
  356. <documentation>
  357. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  358. </documentation>
  359. </annotation>
  360. </attribute>
  361. </complexType>
  362. </element>
  363. <element name="boolean">
  364. <annotation>
  365. <documentation>
  366. Boolean setting for a trigger action.
  367. </documentation>
  368. </annotation>
  369. <complexType>
  370. <attribute name="id" type="string" use="required">
  371. <annotation>
  372. <documentation>
  373. a unique identifier for this setting
  374. </documentation>
  375. </annotation>
  376. </attribute>
  377. <attribute name="name" type="string" use="required">
  378. <annotation>
  379. <documentation>
  380. the name of the setting
  381. </documentation>
  382. <appinfo>
  383. <meta.attribute translatable="true"/>
  384. </appinfo>
  385. </annotation>
  386. </attribute>
  387. <attribute name="description" type="string">
  388. <annotation>
  389. <documentation>
  390. the description of the setting
  391. </documentation>
  392. <appinfo>
  393. <meta.attribute translatable="true"/>
  394. </appinfo>
  395. </annotation>
  396. </attribute>
  397. <attribute name="value" type="boolean">
  398. <annotation>
  399. <documentation>
  400. the default value
  401. </documentation>
  402. </annotation>
  403. </attribute>
  404. <attribute name="preference" type="boolean">
  405. <annotation>
  406. <documentation>
  407. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  408. </documentation>
  409. </annotation>
  410. </attribute>
  411. </complexType>
  412. </element>
  413. <element name="integer">
  414. <annotation>
  415. <documentation>
  416. Integer setting for a trigger action.
  417. </documentation>
  418. </annotation>
  419. <complexType>
  420. <attribute name="id" type="string" use="required">
  421. <annotation>
  422. <documentation>
  423. a unique identifier for this setting
  424. </documentation>
  425. </annotation>
  426. </attribute>
  427. <attribute name="name" type="string" use="required">
  428. <annotation>
  429. <documentation>
  430. the name of the setting
  431. </documentation>
  432. <appinfo>
  433. <meta.attribute translatable="true"/>
  434. </appinfo>
  435. </annotation>
  436. </attribute>
  437. <attribute name="description" type="string">
  438. <annotation>
  439. <documentation>
  440. the description of the setting
  441. </documentation>
  442. <appinfo>
  443. <meta.attribute translatable="true"/>
  444. </appinfo>
  445. </annotation>
  446. </attribute>
  447. <attribute name="value" type="string">
  448. <annotation>
  449. <documentation>
  450. the default value
  451. </documentation>
  452. </annotation>
  453. </attribute>
  454. <attribute name="preference" type="boolean">
  455. <annotation>
  456. <documentation>
  457. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  458. </documentation>
  459. </annotation>
  460. </attribute>
  461. <attribute name="min" type="string">
  462. <annotation>
  463. <documentation>
  464. the minimum allowed integer value for this setting
  465. </documentation>
  466. </annotation>
  467. </attribute>
  468. <attribute name="max" type="string">
  469. <annotation>
  470. <documentation>
  471. the maximum allowed integer value for this setting
  472. </documentation>
  473. </annotation>
  474. </attribute>
  475. </complexType>
  476. </element>
  477. <element name="float">
  478. <annotation>
  479. <documentation>
  480. Float setting for a trigger action.
  481. </documentation>
  482. </annotation>
  483. <complexType>
  484. <attribute name="id" type="string" use="required">
  485. <annotation>
  486. <documentation>
  487. a unique identifier for this setting
  488. </documentation>
  489. </annotation>
  490. </attribute>
  491. <attribute name="name" type="string" use="required">
  492. <annotation>
  493. <documentation>
  494. the name of the setting
  495. </documentation>
  496. <appinfo>
  497. <meta.attribute translatable="true"/>
  498. </appinfo>
  499. </annotation>
  500. </attribute>
  501. <attribute name="description" type="string">
  502. <annotation>
  503. <documentation>
  504. the description of the setting
  505. </documentation>
  506. <appinfo>
  507. <meta.attribute translatable="true"/>
  508. </appinfo>
  509. </annotation>
  510. </attribute>
  511. <attribute name="value" type="string">
  512. <annotation>
  513. <documentation>
  514. the default value
  515. </documentation>
  516. </annotation>
  517. </attribute>
  518. <attribute name="preference" type="boolean">
  519. <annotation>
  520. <documentation>
  521. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  522. </documentation>
  523. </annotation>
  524. </attribute>
  525. <attribute name="min" type="string">
  526. <annotation>
  527. <documentation>
  528. the minimum allowed float value for this setting
  529. </documentation>
  530. </annotation>
  531. </attribute>
  532. <attribute name="max" type="string">
  533. <annotation>
  534. <documentation>
  535. the maximum allowed float value for this setting
  536. </documentation>
  537. </annotation>
  538. </attribute>
  539. </complexType>
  540. </element>
  541. <element name="password">
  542. <annotation>
  543. <documentation>
  544. Password setting for a trigger action.
  545. </documentation>
  546. </annotation>
  547. <complexType>
  548. <attribute name="id" type="string" use="required">
  549. <annotation>
  550. <documentation>
  551. a unique identifier for this setting
  552. </documentation>
  553. </annotation>
  554. </attribute>
  555. <attribute name="name" type="string" use="required">
  556. <annotation>
  557. <documentation>
  558. the name of the setting
  559. </documentation>
  560. <appinfo>
  561. <meta.attribute translatable="true"/>
  562. </appinfo>
  563. </annotation>
  564. </attribute>
  565. <attribute name="description" type="string">
  566. <annotation>
  567. <documentation>
  568. the description of the setting
  569. </documentation>
  570. <appinfo>
  571. <meta.attribute translatable="true"/>
  572. </appinfo>
  573. </annotation>
  574. </attribute>
  575. <attribute name="value" type="string">
  576. <annotation>
  577. <documentation>
  578. the default value
  579. </documentation>
  580. </annotation>
  581. </attribute>
  582. <attribute name="preference" type="boolean">
  583. <annotation>
  584. <documentation>
  585. set to true if the default value should be fetched from the preference store for the RJMXPlugin using the id as a key.
  586. </documentation>
  587. </annotation>
  588. </attribute>
  589. </complexType>
  590. </element>
  591. <annotation>
  592. <appinfo>
  593. <meta.section type="since"/>
  594. </appinfo>
  595. <documentation>
  596. 5.2.0
  597. </documentation>
  598. </annotation>
  599. <annotation>
  600. <appinfo>
  601. <meta.section type="examples"/>
  602. </appinfo>
  603. <documentation>
  604. &lt;extension point=&quot;com.jrockit.mc.rjmx.triggerActions&quot;&gt;
  605. &lt;triggerAction
  606. class=&quot;com.jrockit.example.triggers.actions.HelloAction&quot;
  607. description=&quot;Hello World Action&quot;
  608. icon=&quot;icons/console_view.png&quot;
  609. id=&quot;com.jrockit.example.triggers.HelloWorld&quot;
  610. name=&quot;Hello World&quot;&gt;
  611. &lt;string
  612. id=&quot;com.jrockit.example.triggers.actions.user.name&quot;
  613. name=&quot;Your Name&quot;
  614. value=&quot;Mr X&quot;&gt;
  615. &lt;/string&gt;
  616. &lt;/triggerAction&gt;
  617. &lt;/extension&gt;
  618. package com.jrockit.example.triggers.actions;
  619. import com.jrockit.mc.rjmx.triggers.TriggerAction;
  620. import com.jrockit.mc.rjmx.triggers.TriggerEvent;
  621. public class HelloAction extends TriggerAction
  622. {
  623. public void handleNotificationEvent(TriggerEvent e)
  624. {
  625. System.out.println(&quot;Hello &quot; + getSetting(&quot;com.jrockit.example.triggers.actions.user.name&quot;).getString() +&quot;! Trigger value is &quot; + e.getTriggerValue());
  626. }
  627. }
  628. </documentation>
  629. </annotation>
  630. <annotation>
  631. <appinfo>
  632. <meta.section type="copyright"/>
  633. </appinfo>
  634. <documentation>
  635. Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  636. </documentation>
  637. </annotation>
  638. </schema>