Preparing for 2.2 release
This commit is contained in:
parent
158386ef44
commit
702aa45a18
10
README.md
10
README.md
|
|
@ -6,15 +6,17 @@ This project provides a Java client to manipulate Mikrotik routers using the rem
|
||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
|
|
||||||
|
**The current stable version is 2.2**
|
||||||
|
|
||||||
This library uses [semantic versioning](http://semver.org/)
|
This library uses [semantic versioning](http://semver.org/)
|
||||||
|
|
||||||
**The current stable version is 2.1**
|
### Changes in version 2.2:
|
||||||
|
|
||||||
### Changes in version 2.1:
|
Version 2.2 implements AutoCloseable on ApiConnection to support Java 7's try-with-resources statement.
|
||||||
|
|
||||||
Version 2.1 adds the ability to use connection and command timeouts as requested by users. To see how to use these, please refer to the examples below. For more information, look at issue [#16](https://github.com/GideonLeGrange/mikrotik-java/issues/16).
|
#### Previous 2.x versions:
|
||||||
|
|
||||||
#### Previous 2.0 versions:
|
* 2.1 added the ability to use connection and command timeouts as.
|
||||||
|
|
||||||
* 2.0.3 Fixed bug #18 - An empty username in ```login()``` caused the API to hang.
|
* 2.0.3 Fixed bug #18 - An empty username in ```login()``` caused the API to hang.
|
||||||
* 2.0.2 Fixed bug #13 - processor thread wasn't being stopped on disconnect(), causing non-exit of application in some cases.
|
* 2.0.2 Fixed bug #13 - processor thread wasn't being stopped on disconnect(), causing non-exit of application in some cases.
|
||||||
|
|
|
||||||
2
pom.xml
2
pom.xml
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
<groupId>me.legrange</groupId>
|
<groupId>me.legrange</groupId>
|
||||||
<artifactId>mikrotik</artifactId>
|
<artifactId>mikrotik</artifactId>
|
||||||
<version>2.1</version>
|
<version>2.2</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>Mikrotik API Java Client Library</name>
|
<name>Mikrotik API Java Client Library</name>
|
||||||
|
|
|
||||||
|
|
@ -2,27 +2,25 @@ package examples;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import me.legrange.mikrotik.ApiConnection;
|
||||||
import me.legrange.mikrotik.MikrotikApiException;
|
import me.legrange.mikrotik.MikrotikApiException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Example 9: Test special characters in usernames
|
* Example 9: Try with resources
|
||||||
*
|
*
|
||||||
* @author gideon
|
* @author gideon
|
||||||
*/
|
*/
|
||||||
public class Example9 extends Example {
|
public class Example9 {
|
||||||
|
|
||||||
public static void main(String... args) throws Exception {
|
public static void main(String... args) throws Exception {
|
||||||
Example9 ex = new Example9();
|
Example9 ex = new Example9();
|
||||||
ex.connect();
|
|
||||||
ex.test();
|
ex.test();
|
||||||
ex.disconnect();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void test() throws MikrotikApiException, InterruptedException {
|
private void test() throws MikrotikApiException, InterruptedException {
|
||||||
List<Map<String, String>> res = con.execute("/user/add name=çãáõ");
|
try (ApiConnection con = ApiConnection.connect(Config.HOST, ApiConnection.DEFAULT_PORT, 2000)) {
|
||||||
for (Map<String, String> r : res) {
|
con.login(Config.USERNAME, Config.PASSWORD);
|
||||||
System.out.println(r);
|
con.execute("/user/add name=eric");
|
||||||
}
|
}
|
||||||
// con.execute("/ip/firewall/filter/add chain=forward hotspot=!auth protocol=tcp src-port=8000-8084");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue