WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

Category:accessor prototype

PythonPrototype is an accessor that must be instantiated from a prototype. You must instantiate the prototype in your module to create an accessor that can receive requests.


The PythonPrototype prototype has the following initialisation parameters:

scriptMandatoryIdentifier or XML(none)
Python program to execute
An identifier grammar definition.
comma separated list of supported verbs
If included this parameter will mark the endpoint as private and it will not be exposed outside module.
An identifier for created logical endpoint, if omitted a unique auto-generated value it will be used.
fromRepresentationAny quantityStringnull
used when creating transreptor
toRepresentationAny quantityStringnull
used when creating transreptor
metaOptionalXMLnull(no description available)

Here is an auto-generated example of how to instantiate an instance of PythonPrototype:

  <script>Python program to execute</script>
  <grammar>an identifier grammar definition</grammar>
Import Requirements

To use PythonPrototype accessor prototype you must import the module urn:org:netkernel:lang:python:


The Python language prototype is an alternate way of using the python functionality to the runtime. The prototype allows the instantiation of a python implemented endpoint within your application without the need to [map requests to it. This has benefits of compactness and the ability to implement transreptors.


The comma separate list of verbs defines which verbs will be supported by the instantiated python accessor. This defaults to just "SOURCE". See the mapper verbs document for examples of how to set this string.

The runtime contains documentation on how to differentiate handling of different verbs.


Here's how to declare an Accessor using the PythonPrototype with script res:/test/helloworld.py

Then create a static resource containing your python script:

// Python code to implement simple transreptor
primary = context.sourcePrimary(java.lang.Object)
rep = new org.ten60.netkernel.lang.python.test.MyRep(primary)