Package net.azib.ipscan.core.values

Examples of net.azib.ipscan.core.values.NumericRangeList


    SortedSet<Integer> openPorts = getOpenPorts(subject);
    boolean portsFound = openPorts.size() > 0;
    if (portsFound) {
      subject.setResultType(ResultType.WITH_PORTS);
    }
    return portsFound ? new NumericRangeList(openPorts, displayAsRanges) : null;
  }
View Full Code Here


    boolean portsScanned = scanPorts(subject);
    if (!portsScanned)
      return NotScanned.VALUE;

    SortedSet<Integer> filteredPorts = getFilteredPorts(subject);
    return filteredPorts.size() > 0 ? new NumericRangeList(filteredPorts, displayAsRanges) : null;
  }
View Full Code Here

  public void testBasic() throws IOException {
    Labels labels = Labels.getInstance();
   
    exporter.start(outputStream, "feederstuff");   
    exporter.setFetchers(new String[] {"fetcher1", labels.get(IPFetcher.ID), "mega long fetcher 2", labels.get(PortsFetcher.ID)});
    exporter.nextAdressResults(new Object[] {"", "123", "", new NumericRangeList(Arrays.asList(1,23,4,5,6,78), true)});
    exporter.end();
   
    assertContains("123:1");
    assertContains("123:23");
    assertContains("123:4");   
View Full Code Here

   
    // n/a and n/s are at the end
    assertTrue(comparator.compare(res(125), res(NotScanned.VALUE)) < 0);
    assertTrue(comparator.compare(res(9090), res(NotAvailable.VALUE)) < 0);
   
    assertTrue(comparator.compare(res(9090), res(new NumericRangeList(Arrays.asList(9090), false))) == 0);
    assertTrue(comparator.compare(res(new NumericRangeList(Arrays.asList(154), false)), res(155)) < 0);
    assertTrue(comparator.compare(res(new NumericRangeList(Arrays.asList(1, 2, 3), false)), res(new NumericRangeList(Arrays.asList(5, 6), false))) > 0);
   
    assertTrue(comparator.compare(res("abc"), res("def")) < 0);
    assertTrue(comparator.compare(res("123"), res(123)) == 0);
    assertTrue(comparator.compare(res("ZZZ"), res(99)) > 0);
    assertTrue(comparator.compare(res("125"), res("13")) < 0);
View Full Code Here

   
    synchronized (server) {
      server.start();
      server.wait();
    }
    NumericRangeList value = (NumericRangeList) fetcher.scan(new ScanningSubject(InetAddress.getLocalHost()));
    assertEquals(config.portString, value.toString());
   
    fetcher.cleanup();
  }
View Full Code Here

TOP

Related Classes of net.azib.ipscan.core.values.NumericRangeList

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.