congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Join (org.hibernate.mapping)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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