orignal
btw, what is a plugin technically?
orignal
and what needs to be implemneted on router side?
orignal
e.g. bascially what invokes plugin code?
dr|z3d
orignal: i2p-projekt.i2p/spec/plugin
RN
router side, yes. invokes code, yes. has specs? see dr|z3d's link
RN
my favorite is probably the SnowMan plugin
RN
;)
orignal
thanks, I will check
orignal
it doesn't explain how it work
orignal
s
zzz
what do you want to know
eyedeekay
Somebody's experimenting with github account takeover techniques today
eyedeekay
Don't accept transfer-ownership of repositories from strangers :)
dr|z3d
:)
orignal
zzz, I want to know how can I call plugin from i2pd through a JNI wrapper
orignal
say, you have a plugin like susimail
orignal
how plugins get registered and get invoked
eyedeekay
orignal it's probably easier to do it **without** a plugin in the case of something like susimail
eyedeekay
With something like susimail it's probably quicker write some launcher/wrapper stuff and package it to run standalone like snark
eyedeekay
Plugins let the applications that implement them appear as ClientApp, which lets them have their lifecycle managed by the ClientAppManager
eyedeekay
And they get access to a bunch of Java APIs
eyedeekay
Not sure how much you even care about those things, my impression is that i2pd people do what plugins do with ClientAppManager using a service manager or docker-compose
zzz
orignal, JNI is really for calling from java out to native, not the other way
zzz
plugins are meant to be plugged in to a running router and/or console
zzz
you couldn't really fire up a i2p plugin from i2pd, just like you couldn't run a firefox plugin or a netscape plugin either
zzz
or eclipse plugin
zzz
the details are in the spec but it's very java-specific, it's build around java APIs and java dynamic classloading
orignal
come on. JNI is also used another way
orignal
did it million times before
orignal
JNI lib called from C++
orignal
it's still not an answer
orignal
and yes I can run firefox plugin in another browser if write a proper api wrapper
orignal
and again that question is what is an entry point of plugin
orignal
how to create an envoronment for plugin it's another task
eyedeekay
re: registration/invocation: Plugins get registered with the java "ClientAppManager" as "ClientApp"s, they have "properties" file which define whether they should run when the router starts or when activated by user-action, they define startup and shutdown methods when they implement the ClientApp, those startup and shutdown methods are invoked by the CAM at the time specified by A) the properties file
eyedeekay
or B) when initiated by user action
zzz
orignal, the entry point is configured in plugin.config. See the spec.
dr|z3d
LOL
dr|z3d
zzz, come on.
dr|z3d
*** chuckles. ***
zzz
?
orignal
thanks. got it
orignal
so, what I need. read config and call specified method from class file through JNI
dr|z3d
orignal's response.. made me laugh.
orignal
then it easy to implement
zzz
right. plugin.config contains all the metadata
zzz
correction, while most metadata is in plugin.config, the entry point is specified in clients.config
orignal
ofc if I want to use a plugin I need to prvide own wrapper replacing Java router's calls