Vyacheslav
dd77e4628f
Strong typed API for synchronous TDLib method execution in Java interface
...
`Client.execute` in Java interface is now strongly typed: returned TDLib object type depends on the return type defined in the corresponding Function class.
When TDLib error is occurred, method now throws `Client.ExecutionError`.
This change adds compile-time protection against return type change and allows using this pattern:
```
try {
TdApi.SpecificReturnType result = Client.execute(function);
// work with strongly typed resultl without casting and type checks
} catch (Client.ExecutionError error) {
// Handle error
}
```
2023-10-26 13:15:37 +03:00
levlam
419a28125b
Remove finalizer from Java Client.
2023-04-26 16:15:44 +03:00
levlam
cf1984844b
Update copyright year.
2023-01-01 00:28:08 +03:00
levlam
4d5625a06f
Explicitly load tdjni in Client.java and TdApi.java.
2022-09-08 14:27:07 +03:00
levlam
89aaf648fc
Add Client.setLogMessageHandler to Java example.
2022-07-08 15:01:38 +03:00
levlam
8085779cdc
Update copyright year.
2022-01-01 03:35:39 +03:00
levlam
52c1da0a70
Update copyright year.
2021-01-01 15:57:46 +03:00
levlam
66af1a439a
Use getOptions as first request.
2020-11-14 23:00:05 +03:00
levlam
5ce7448f7a
Send a dummy request to initialize client.
2020-11-12 16:53:51 +03:00
levlam
358c0f2249
Add clientCount in Java example.
...
GitOrigin-RevId: 7b7dfcf77de1ab1db55dd42642b59f5b039943cb
2020-10-13 15:39:17 +03:00
levlam
919848f0fe
Use ClientManager for Java example interface implementation.
...
GitOrigin-RevId: 4280b6407a1c1a18bf2a6e952f6761847b69cb83
2020-10-11 21:28:33 +03:00
levlam
b204ad4ee1
Store default exception handlers as static map in Java example.
...
GitOrigin-RevId: 5745859a70250d104a21edad473b655967060609
2020-10-05 21:31:27 +03:00
levlam
da55a34afc
Remove ability to change update handler after client creation.
...
GitOrigin-RevId: 917737a440afaeb99f8a8ca809cda2d267bb4b02
2020-10-05 20:18:59 +03:00
levlam
5f605d2dd2
Fix spelling of "update handler".
...
GitOrigin-RevId: 2137852d967606e909e82396b4103817b1b39386
2020-10-05 20:13:15 +03:00
levlam
c72d18bcd3
Java example: store update handlers separately.
...
GitOrigin-RevId: dc035dc72756db604731ae7549b172ba54b5d78e
2020-10-05 18:58:38 +03:00
levlam
80c35676a2
Update copyright year.
...
GitOrigin-RevId: 09afb551b6e637dc69739fa735b0051a38b9e14c
2020-01-01 04:23:48 +03:00
levlam
eaebfad034
Update copyright year.
...
GitOrigin-RevId: 359e2b43322222922c44c430d3814b0a4c778dc6
2019-01-01 01:02:34 +03:00
levlam
b339833ef9
Add Java example.
...
GitOrigin-RevId: 09903810042bd576bff2f59f4cd4cb498af13749
2018-01-28 13:58:33 +03:00