• Welcome to KonaKart Community Forum. Please login or sign up.
 

Questions on API Customization

Started by pgf, January 04, 2012, 02:18:56 pm

Previous topic - Next topic

pgf

Hi there,
I was getting into the API customization (via the User Guide) and some questions came up.

1) If I want to use the custom engine API, I need to explicit call the custom constructor ?
engine_ = new KKCustomEng(engineConfig);
Or I could/should just edit the properties file ? konakart_app.properties:
konakart.app.engineclass=com.konakart.app.KKCustomEng

I was hoping just to use the properties file, but couldn't make it work. It can be just some bad configuration/wrong file issue, just trying to confirm it.

2) Is the supported customization based exclusively on the Custom.java file with the custom(String a, String b) function (and it's secure relatives) ?
As you say on the User Guide, we can use the two arguments to say the function and parameters to be called, via XML or JSON or something like that, but that isn't very "pretty" when working with several parameter and return types.
Isn't it possible to add our own functions to the custom engine KKCustomEng ? We could add another interface (KKCustomEngIf) to "share" our custom functions and make KKCustomEng implement it, so that we didn't need to make modifications on the default interface KKEngIf.

Thank you.