Examples of JMXConnectorProvider


Examples of com.sun.cli.jmx.spi.JMXConnectorProvider

   
    println( "\nProviders successfully loaded (includes built-ins): " );
    final JMXConnectorProvider []  providersLoaded  = getConnectionMgr().getProviders();
    for ( int i = 0; i < providersLoaded.length; ++i )
    {
      JMXConnectorProvider provider  = providersLoaded[ i ];
     
      println( provider.getClass().getName() );
    }
  }
View Full Code Here

Examples of com.sun.cli.jmx.spi.JMXConnectorProvider

  createProvider( String className )
    throws ClassNotFoundException, IllegalAccessException, InstantiationException
  {
    final Class  theClass  = Class.forName( className );
   
    final JMXConnectorProvider  provider = (JMXConnectorProvider)theClass.newInstance( );
   
    return( provider );
  }
View Full Code Here

Examples of com.sun.cli.jmx.spi.JMXConnectorProvider

 
    public void
  addProvider( Class provider )
    throws IllegalAccessException, InstantiationException, ClassNotFoundException
  {
    final JMXConnectorProvider  instance = (JMXConnectorProvider)provider.newInstance( );
   
    // last added = first priority
    mProviders.add( 0, instance );
  }
View Full Code Here

Examples of com.sun.cli.jmx.spi.JMXConnectorProvider

    final JMXConnectorProvider []  providers  = getProviders();
     
    Connection  conn  = null;
    for( int i = 0; i < providers.length; ++i )
    {
      final JMXConnectorProvider provider  = (JMXConnectorProvider)providers[ i ];
     
      if ( provider.isSupported( map ) )
      {
        final JMXConnector  jmxConn  = provider.connect( map );
       
        conn  = new Connection( name, connectInfo, jmxConn );
        break;
      }
    }
View Full Code Here

Examples of javax.management.remote.JMXConnectorProvider

   {
      // Yes, throw NPE if url is null (spec compliant)
      String protocol = normalizeProtocol(url.getProtocol());
      String providerPackages = findProviderPackageList(env, JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES);
      ClassLoader classLoader = findProviderClassLoader(env, JMXConnectorFactory.PROTOCOL_PROVIDER_CLASS_LOADER);
      JMXConnectorProvider provider = (JMXConnectorProvider)loadProvider(providerPackages, protocol, MX4JRemoteConstants.CLIENT_PROVIDER_CLASS, classLoader);
      return provider;
   }
View Full Code Here

Examples of javax.management.remote.JMXConnectorProvider

    return Collections.unmodifiableSet(transports.keySet());
  }

  @Override
    public JMXConnectorProvider getConnectorProvider(String key) {
    final JMXConnectorProvider connector = transports.get(key);

    // TODO: Add logging

    return connector;
  }
View Full Code Here

Examples of javax.management.remote.JMXConnectorProvider

  @Override
    public JMXConnector getJMXConnector(JMXServiceDescriptor serviceDescriptor) {
    try {
      final String transport = serviceDescriptor.getUrl().getProtocol();

      final JMXConnectorProvider connectorProvider = getConnectorProvider(transport);

      final JMXServiceURL url = getJMXServiceURL(
                  serviceDescriptor.getUrl().getHost(),
                  serviceDescriptor.getUrl().getPort(),
                  serviceDescriptor.getUrl().getProtocol(),
                  serviceDescriptor.getDomain());

      Map<String, Object> environment = null;
      if (serviceDescriptor.getUsername() != null) {
        environment = new HashMap<String, Object>();
        String[] credentials = new String[] {
              serviceDescriptor.getUsername(),
              serviceDescriptor.getPassword()
        };
        environment.put(JMXConnector.CREDENTIALS, credentials);
      }

      return connectorProvider.newJMXConnector(url, environment);
    } catch (Exception e) {
      KarafWorkbenchActivator.getLogger().error(e.getMessage(), e);
      return null;
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.