All Downloads are FREE. Search and download functionalities are using the official Maven repository.

examples.Example3 Maven / Gradle / Ivy

There is a newer version: 3.0.8
Show newest version
package examples;

import java.util.List;
import java.util.Map;
import me.legrange.mikrotik.MikrotikApiException;

/**
 * Example 3: Queries. Print all interfaces of a certain type. 
 *
 * @author gideon
 */
public class Example3 extends Example {

    public static void main(String... args) throws Exception {
        Example3 ex = new Example3();
        ex.connect();
        ex.test();
        ex.disconnect();
    }

    private void test() throws MikrotikApiException {
        List> results =  con.execute("/interface/print where type=ether");
        for (Map result : results) {
            System.out.println(result);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy