diff --git a/src/examples/Config.java b/src/examples/Config.java deleted file mode 100644 index 0e81b2a..0000000 --- a/src/examples/Config.java +++ /dev/null @@ -1,15 +0,0 @@ -package examples; - -/** - * Config class for examples - * @author gideon - */ -public class Config { - - - public static final String USERNAME = "admin"; - public static final String PASSWORD = ""; - public static final String HOST = "10.0.1.3"; - - -} diff --git a/src/examples/Example.java b/src/examples/Example.java deleted file mode 100644 index 33dea60..0000000 --- a/src/examples/Example.java +++ /dev/null @@ -1,22 +0,0 @@ -package examples; - -import me.legrange.mikrotik.ApiConnection; - -/** - * - * @author gideon - */ - abstract class Example { - - protected void connect() throws Exception { - con = ApiConnection.connect(Config.HOST); - con.login(Config.USERNAME, Config.PASSWORD); - } - - protected void disconnect() throws Exception { - con.disconnect(); - } - - protected ApiConnection con; - -} diff --git a/src/examples/Example1.java b/src/examples/Example1.java deleted file mode 100644 index f74c67e..0000000 --- a/src/examples/Example1.java +++ /dev/null @@ -1,23 +0,0 @@ -package examples; - -import me.legrange.mikrotik.MikrotikApiException; - -/** - * Example 1: A very simple example: Reboot the remote router - * @author gideon - */ -public class Example1 extends Example { - - public static void main(String...args) throws Exception { - Example1 ex = new Example1(); - ex.connect(); - ex.test(); - ex.disconnect(); - } - - private void test() throws MikrotikApiException { - con.execute("/system/reboot"); - } - - -} diff --git a/src/examples/Example2.java b/src/examples/Example2.java deleted file mode 100644 index 7638acb..0000000 --- a/src/examples/Example2.java +++ /dev/null @@ -1,27 +0,0 @@ -package examples; - -import java.util.List; -import me.legrange.mikrotik.MikrotikApiException; -import me.legrange.mikrotik.Result; - -/** - * Example 2: Print all interfaces - * - * @author gideon - */ -public class Example2 extends Example { - - public static void main(String... args) throws Exception { - Example2 ex = new Example2(); - ex.connect(); - ex.test(); - ex.disconnect(); - } - - private void test() throws MikrotikApiException { - List results = con.execute("/interface/print"); - for (Result result : results) { - System.out.println(result); - } - } -} diff --git a/src/examples/Example3.java b/src/examples/Example3.java deleted file mode 100644 index 7638acb..0000000 --- a/src/examples/Example3.java +++ /dev/null @@ -1,27 +0,0 @@ -package examples; - -import java.util.List; -import me.legrange.mikrotik.MikrotikApiException; -import me.legrange.mikrotik.Result; - -/** - * Example 2: Print all interfaces - * - * @author gideon - */ -public class Example2 extends Example { - - public static void main(String... args) throws Exception { - Example2 ex = new Example2(); - ex.connect(); - ex.test(); - ex.disconnect(); - } - - private void test() throws MikrotikApiException { - List results = con.execute("/interface/print"); - for (Result result : results) { - System.out.println(result); - } - } -}