<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title xmlns:diffmk="http://diffmk.sf.net/ns/diff">Chapter 6. Extension API</title><link rel="stylesheet" href="css/tools_release.css" type="text/css"/><meta xmlns:diffmk="http://diffmk.sf.net/ns/diff" name="generator" content="DocBook XSL Stylesheets V1.72.0"/><link xmlns="" xmlns:diffmk="http://diffmk.sf.net/ns/diff" rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon.ico"/><script xmlns="" xmlns:diffmk="http://diffmk.sf.net/ns/diff" type="text/javascript" src="script/toggle.js"><!--If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.--></script><link rel="start" href="index.html" title="JMX Tools Reference Guide"/><link rel="up" href="index.html" title="JMX Tools Reference Guide"/><link rel="prev" href="how_to.html" title="Chapter 5. How to ..."/><script xmlns="" xmlns:diffmk="http://diffmk.sf.net/ns/diff" type="text/javascript" src="script/prototype-1.6.0.2.js"><!--If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.--></script><script xmlns="" xmlns:diffmk="http://diffmk.sf.net/ns/diff" type="text/javascript" src="script/effects.js"><!--If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.--></script><script xmlns="" xmlns:diffmk="http://diffmk.sf.net/ns/diff" type="text/javascript" src="script/scriptaculous.js"><!--If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.--></script></head><body><div xmlns="" xmlns:diffmk="http://diffmk.sf.net/ns/diff" id="overlay"> </div><div xmlns="" xmlns:diffmk="http://diffmk.sf.net/ns/diff" class="time_out_div" id="timeOutDiv"> </div><div xmlns="" xmlns:diffmk="http://diffmk.sf.net/ns/diff" id="feedback-maincontainer"><h3 id="feedback-header">
        Create new JBoss Tools Documentation Jira issue
        <a href="javascript:void(0);" onclick="hidePopup('feedback-maincontainer', 'feedback-mailform', 'feedback-iFrame','feedback-submit', 'feedback-maincontainer');" id="feedback-close"><img src="images/close_org.png" class="feedback-images"/></a></h3><iframe id="feedback-iFrame" name="feedback-iFrame"> </iframe><form onsubmit="return validate_form()" id="feedback-mailform" method="post" action="https://jira.jboss.org/jira/secure/CreateIssueDetails!init.jspa?pid=12310341&amp;issuetype=3" target="feedback-iFrame"><input type="hidden" id="priority" name="priority" value="3"/><input type="hidden" id="components" name="components" value="12311170"/><input type="hidden" id="versions" name="versions" value="12312451"/><input type="hidden" id="customfield_12310031" name="customfield_12310031" value="Documentation (Ref Guide, User Guide, etc.)"/><label for="summary">Summary</label><input type="text" id="feedback-summary" name="feedback-summary" title="Summarize the subject of the issue in a few words" maxlength="255" onKeyDown="countLeft('feedback-summary', 'left', 255);" onKeyUp="countLeft('feedback-summary', 'left', 255);"/><div id="summary-helper-left" class="feedback-helper"><span id="left">255</span> characters left
        </div><div class="clear"> </div><label for="feedback-description">Description</label><textarea id="feedback-description" name="feedback-description" title="Provide more details about the issue" onKeyDown="countLeft('feedback-description', 'none', 500);" onKeyUp="countLeft('feedback-description', 'none', 500);"> </textarea><div class="clear"> </div><label for="feedback-environment">Environment</label><textarea id="feedback-environment" name="feedback-environment" title="Describe your environment"> </textarea></form><div id="guide_words">This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.</div><input type="button" id="feedback-submit" value="Proceed to Jira" name="submit" class="feedback-formbutton" title="Proceed to create new issue" onclick="fillForm('feedback-mailform'); submitForm('feedback-mailform', 'feedback-iFrame', 'feedback-submit', 'feedback-maincontainer');"/></div><div xmlns="" xmlns:diffmk="http://diffmk.sf.net/ns/diff" id="feedback-wrapper"><a id="feedback-link" onclick="showPopup('feedback-maincontainer');"><img src="images/feedback_logo.png" class="feedback-images" onload="init('feedback-summary', 'feedback-description');"/></a></div><p xmlns:diffmk="http://diffmk.sf.net/ns/diff" id="title"><a href="http://www.jboss.org" class="site_href"><strong>JBoss.org</strong></a><a href="http://docs.jboss.org/" class="doc_href"><strong>Community Documentation</strong></a></p><ul xmlns:diffmk="http://diffmk.sf.net/ns/diff" class="docnav"><li class="previous"><a accesskey="p" href="how_to.html"><strong>Prev</strong></a></li><li class="next"/></ul><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 xmlns="" class="&#xA;&#x9;&#x9;&#x9;title&#xA;&#x9;&#x9;"><a xmlns="http://www.w3.org/1999/xhtml" id="extensions"/>Chapter 6. Extension API</h2></div></div></div><div class="toc"><dl><dt><span xmlns="" xmlns:diffmk="http://diffmk.sf.net/ns/diff" class="section"><a href="extensions#d0e635">6.1. Why??</a></span></dt><dt><span xmlns="" xmlns:diffmk="http://diffmk.sf.net/ns/diff" class="section"><a href="extensions#d0e640">6.2. Core Extensions</a></span></dt><dt><span xmlns="" xmlns:diffmk="http://diffmk.sf.net/ns/diff" class="section"><a href="extensions#d0e649">6.3. UI Extensions</a></span></dt></dl></div><p>This chapter will outline how to contribute your own Server type with some default
      behavior.</p><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 xmlns="" class="title"><a xmlns="http://www.w3.org/1999/xhtml" id="d0e635"/>6.1. Why??</h2></div></div></div><p>You might be asking yourself why you'd need to extend this framework if JMX is
         a standard. Perhaps you want a connection to be automatically created after some specific
         action, or perhaps you want your connection wizard to do more than simply set a host and
         port. JBoss, for example, requires setting some credentials on the client machine, but
         using JBoss classes to do it. This requires that the connection have access to JBoss
         jars.</p></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 xmlns="" class="title"><a xmlns="http://www.w3.org/1999/xhtml" id="d0e640"/>6.2. Core Extensions</h2></div></div></div><p>To create your own JMX Connection type, you must use the
         org.jboss.tools.jmx.core.MBeanServerConnectionProvider extension point. This point takes
         one child, a connectionProvider with a class that implements
         org.jboss.tools.jmx.core.IConnectionProvider.</p><p>An IConnectionProvider is responsible for creation and deletion of IConnectionWrapper
         objects. It must also keep a list of listeners that it is expected to inform when a
         connection is added or removed from its list. </p><p>Each IConnectionWrapper is expected to handle running arbitrary JMX runnables or getting
         a "Root" object representing all JMX nodes. There are some utility methods the
         IConnectionWrapper can make use of.</p></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 xmlns="" class="title"><a xmlns="http://www.w3.org/1999/xhtml" id="d0e649"/>6.3. UI Extensions</h2></div></div></div><p>There are two extension points currently approved for use in the UI</p><div class="itemizedlist"><ul><li><p>org.jboss.tools.jmx.ui.providerUI - provide an icon, id, displayable name, and
               wizardPage class for creation of new connections</p></li><li><p>org.jboss.tools.jmx.ui.attribute.controls - allows you to map class types to some
            Control to present them in the MBean Editor</p><p>We hope, this guide helped you to get started with the JBoss JMX Tools. Besides, for additional information you are welcome on <a xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.jboss.com/index.html?module=bb&amp;op=viewforum&amp;f=201">JBoss forum</a>.</p></li></ul></div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="how_to.html"><strong>Prev</strong>Chapter 5. How to ...</a></li><li class="up"><a accesskey="u" href="#"><strong>Top of page</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Front page</strong></a></li></ul></body></html>