implementing endpoints with prototypes

Poster Content
nk4um User
Posts: 112
May 30, 2010 06: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
Like · Post Reply
nk4um Administrator
Posts: 607
May 29, 2010 09: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
Like · Post Reply
nk4um User
Posts: 112
May 28, 2010 20: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?
Like · Post Reply
nk4um Administrator
Posts: 607
May 28, 2010 18: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
Like · Post Reply
nk4um User
Posts: 112
May 28, 2010 16:48implementing endpoints with prototypes
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).
Like · Post Reply