|
nk4um User
Posts: 101
|
2010-05-30T07:39:13.000ZMay 30, 2010 07:39
|
They do not currently have any mechanism to hook the postCommission and preDecommision by the script.
|
Ah, I see. I guess chalk it up as a feature request then. (And for javascript too, if you get around to implementing it.) Thanks, -J
|
|
nk4um Moderator
Posts: 485
|
2010-05-29T10:35:04.000ZMay 29, 2010 10:35
|
This indirection enables endpoints to be implemented on named prototypes and as a consequence, for example, means that complete
fully capable endpoints (transports, transreptors, accessors etc) can be implemented in any of the dynamic languages provided
with NetKernel.
|
With words like "fully capable" I think that sentence must be written by the marketing dept. ;-) The capabilities of any an particular language runtime prototype is dependent upon you that prototype is implemented. I''ve
looked at the source for groovy, beanshell and python - they all use a similar pattern. They do not currently have any mechanism to hook the postCommission and preDecommision by the script. I''ll take note of this and see if we get this working. Cheers, Tony
|
|
nk4um User
Posts: 101
|
2010-05-28T21:07:17.000ZMay 28, 2010 21:07
I just installed the new version; I''m still poking around the improved docs but so far they look nice. Good going!
As for the prototype docs, that shows how to do a transreptor; can the endpoint lifecycle requests be handled also? e.g.,
can I add in a <postCommission> element to indicate a request that should be called at that particular point in the lifecycle?
|
|
nk4um Moderator
Posts: 485
|
2010-05-28T19:18:34.000ZMay 28, 2010 19:18
As it happens, the revamp of the reference documentation in the latest release (hope you like it) explains how to do this:
http://localhost:1060/book/view/book:lang:groovy:book/doc:lang:groovy:groovy:prototype
Cheers, Tony
|
|
nk4um User
Posts: 101
|
The prototype documentation - http://localhost:1060/book/view/book:roc:guide/doc:roc:prototype - says
|
complete fully capable endpoints (transports, transreptors, accessors etc) can be implemented in any of the dynamic languages
provided with NetKernel.
|
Are there any working examples of this? It''s not clear how to set up a transreptor for instance, because work needs to be
done in the constructor; or how the lifecycle phases can be managed by running something in the post-commission phase (for
example, to pre-cache some data on startup).
|