Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize java classes for library use #9

Open
Tiihott opened this issue Dec 13, 2024 · 2 comments
Open

Optimize java classes for library use #9

Tiihott opened this issue Dec 13, 2024 · 2 comments
Assignees
Labels

Comments

@Tiihott
Copy link

Tiihott commented Dec 13, 2024

Description
Optimize the the java classes for using rsm_01 as a library for record schema mapping, the usage of the library shouldn't require any additional dependencies and it should be easy to use.

Exception handling must also be implemented in java classes according to the liblognorm API documentations specified method return values. Errors are expressed with null, -1 and other return values in the API.
A thing to keep an eye on in the exception handling is the logic how liblognorm logs errors, for example loading a rulebase may trigger an error log message even though the method in question returns a 0 stating that the loading of the rulebase was a success.

@Tiihott Tiihott self-assigned this Dec 13, 2024
@Tiihott
Copy link
Author

Tiihott commented Jan 8, 2025

Created separate issue for implementing exception handling.

@Tiihott
Copy link
Author

Tiihott commented Jan 9, 2025

Almost all Liblognorm library methods require the ln_ctx object, which is the the library context descriptor, as input argument.
By encapsulating the ln_ctx pointer inside the java object that interacts with the liblognorm library, it would give the java object its identity and remove the requirement of jna.Pointer usage outside the rsm_01 library.

Methods that do not require the ln_ctx pointer as an input argument can in turn be made into "smarts".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants