congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
JMXConnection
Code IndexAdd Tabnine to your IDE (free)

How to use
JMXConnection
in
jrds.probe

Best Java code snippets using jrds.probe.JMXConnection (Showing top 5 results out of 315)

origin: fbacchella/jrds

@Override
public StarterNode getLevel() {
  return parent.getLevel();
}
origin: fbacchella/jrds

private JMXConnection getCnx(String proto, int port) {
  JMXConnection cnx = new JMXConnection() {
    @Override
    public String getHostName() {
      return "localhost";
    }
  };
  cnx.setPort(port);
  cnx.setProtocol(proto);
  return cnx;
}
origin: fbacchella/jrds

@SuppressWarnings("unused")
private void doTest(String proto, int port) throws Exception {
  mbi = new JrdsMBeanInfo(proto, "localhost", port);
  HostStarter host = new HostStarter(new HostInfo("localhost")) {
    public boolean isCollectRunning() {
      return true;
    }
  };
  host.setTimeout(1);
  JMXConnection cnx = getCnx(proto, port);
  host.registerStarter(new SocketFactory());
  host.registerStarter(new JmxSocketFactory());
  host.registerStarter(cnx);
  host.configureStarters(new PropertiesManager());
  host.startCollect();
  Assert.assertTrue("JMX Connection failed to start", cnx.isStarted());
  Assert.assertNotNull("Failed to read uptime", cnx.setUptime());
  if(false)
    enumerate((NativeJmxSource)cnx.getConnection());
}
origin: fbacchella/jrds

@Override
public Map<String, Double> getNewSampleValuesConnected(JMXConnection cnx) {
  JmxAbstractDataSource<?> mbean = cnx.getConnection();
  try {
    Set<String> collectKeys = getCollectMapping().keySet();
origin: fbacchella/jrds

@Test
public void testConnectionInfo() throws Exception {
  PropertiesManager pm = Tools.makePm(testFolder);
  HostBuilder hb = new HostBuilder();
  hb.setPm(pm);
  hb.setClassLoader(this.getClass().getClassLoader());
  JrdsDocument cnxdoc = new JrdsDocument(Tools.dbuilder.newDocument());
  cnxdoc.doRootElement("host").addElement("connection", "type=jrds.probe.JMXConnection").addElement("attr", "name=port").setTextContent("8999");
  for(ConnectionInfo ci: hb.makeConnexion(cnxdoc.getRootElement(), new HostInfo("localhost"), new HashMap<String, String>(0))) {
    logger.trace(ci.getName());
    StarterNode  sn = new StarterNode() {};
    ci.register(sn);
    JMXConnection cnx = sn.find(JMXConnection.class);
    Assert.assertEquals("Attributed not setted", new Integer(8999), cnx.getPort());
  }
}
jrds.probeJMXConnection

Most used methods

  • getConnection
  • getLevel
  • getPort
  • isStarted
  • setPort
  • setProtocol
  • setUptime

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now