Package org.jboss.tools.jmx.core

Examples of org.jboss.tools.jmx.core.IConnectionWrapper


  }

  @Override
  public Object[] getChildren(Object parentElement) {
    if( parentElement instanceof IConnectionWrapper ) {
      IConnectionWrapper w = (IConnectionWrapper)parentElement;
      Root r = w.getRoot();
      if( r != null ) {
        if (r.containsDomain("org.apache.servicemix")) {
          ServiceMixFacade facade = new JmxTemplateServiceMixFacade(new JmxPluginJmxTemplate(r.getConnection()));
          ServiceMixNode smx = new ServiceMixNode(r, facade);
          return new Object[]{smx};
View Full Code Here


  }

  @Override
  public Object[] getChildren(Object parentElement) {
    if( parentElement instanceof IConnectionWrapper ) {
      IConnectionWrapper w = (IConnectionWrapper)parentElement;
      Root r = w.getRoot();
      if( r != null ) {
        if (r.containsDomain("org.apache.camel")) {
          CamelFacade facade = new JmxTemplateCamelFacade(new JmxPluginJmxTemplate(r.getConnection()));
          CamelContextsNode camel = new CamelContextsNode(r, facade);
          return new Object[]{camel};
View Full Code Here

  }

  @Override
  public Object[] getChildren(Object parentElement) {
    if( parentElement instanceof IConnectionWrapper ) {
      IConnectionWrapper w = (IConnectionWrapper)parentElement;
      Root r = w.getRoot();
      if( r != null ) {
        if (r.containsDomain("osgi.core")) {
          try {
            JmxPluginJmxTemplate jmxTemplate = new JmxPluginJmxTemplate(r.getConnection());
            OsgiFacade facade = new OsgiFacade(jmxTemplate);
View Full Code Here

          return true;
        return false;
      }

      public void serverChanged(ServerEvent event) {
        IConnectionWrapper con = idToConnection.get(event.getServer().getId());
        if( con != null ) {
          if( serverSwitchesToState(event, IServer.STATE_STARTED)) {
            fireAdded(con);
          } else if( serverSwitchesToState(event, IServer.STATE_STOPPED)) {
            fireRemoved(con);
          }
        }
      }

      public void serverAdded(IServer server) {
        if( belongsHere(server)) {
          getConnections();
          if( !idToConnection.containsKey(server.getId())) {
            IConnectionWrapper connection = createConnection(server);
            idToConnection.put(server.getId(), connection);
            if( connection != null && server.getServerState() == IServer.STATE_STARTED )
              fireAdded(idToConnection.get(server.getId()));
          }
        }
      }

      public void serverChanged(IServer server) {
        if( belongsHere(server)) {
          getConnections();
          Object o = idToConnection.get(server.getId());
          if( o == null ) {
            IConnectionWrapper connection = createConnection(server);
            idToConnection.put(server.getId(), connection);
            if( connection != null && server.getServerState() == IServer.STATE_STARTED )
              fireAdded(idToConnection.get(server.getId()));
          }
        }
      }

      public void serverRemoved(IServer server) {
        if( belongsHere(server)) {
          IConnectionWrapper connection;
          if( idToConnection != null ) {
            connection = idToConnection.get(server.getId());
            if( connection != null ) {
              idToConnection.remove(server.getId());
              fireRemoved(connection);
            }
          } else {
            // hasn't been initialized yet
            getConnections();
           
            // but now its missing from the collection, so make one up
            IConnectionWrapper dummy = createConnection(server);
           
            // Make sure we don't fire a removal for a connection that doesn't exist
            if( dummy != null )
              fireRemoved(dummy);
          }
View Full Code Here

    // do it all on demand right now
    if( idToConnection == null ) {
      // load them all
      idToConnection = new HashMap<String, IConnectionWrapper>();
      IServer[] allServers = ServerCore.getServers();
      IConnectionWrapper c;
      for( int i = 0; i < allServers.length; i++ ) {
        if( belongsHere(allServers[i])) {
          c = createConnection(allServers[i]);
          if( c != null )
            idToConnection.put(allServers[i].getId(), c);
View Full Code Here

  protected KarafJMXModel() {
    dummies = new HashMap<IServer, IConnectionWrapper>();
  }
 
  public IConnectionWrapper findConnectionWrapper(IServer server) {
    IConnectionWrapper found = findJVMConnectionWrapper(server);
    if( found == null ) {
      IConnectionWrapper dummy = dummies.get(server);
      if( dummy == null ) {
        dummy = new DummyConnectionWrapper();
        dummies.put(server, dummy);
      }
      return dummy;
View Full Code Here

  }

  @Override
  public Object[] getChildren(Object parentElement) {
    if( parentElement instanceof IConnectionWrapper ) {
      IConnectionWrapper w = (IConnectionWrapper)parentElement;
      Root r = w.getRoot();
      if( r != null ) {
        if (r.containsDomain("io.fabric8")) {
          try {
            JmxPluginJmxTemplate jmxTemplate = new JmxPluginJmxTemplate(r.getConnection());
            Fabric8JMXFacade facade = new Fabric8JMXFacade(jmxTemplate);
View Full Code Here

  }

  @Override
  public Object[] getChildren(Object parentElement) {
    if( parentElement instanceof IConnectionWrapper ) {
      IConnectionWrapper w = (IConnectionWrapper)parentElement;
      Root r = w.getRoot();
      if( r != null ) {
        if (r.containsDomain("org.apache.activemq")) {
          BrokerFacade facade = new JmxTemplateBrokerFacade(new JmxPluginJmxTemplate(r.getConnection()));
          String brokerName = null;
          try {
View Full Code Here

TOP

Related Classes of org.jboss.tools.jmx.core.IConnectionWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.