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 .

Endpoint
Name:Limiter
Description:Use to limit an address space - when provided with a request matching its grammar it will cause early termination of resolution, possibly stopping resolution from an outer scope.
Id:layer1.Endpoint.Limiter
Category:accessor prototype

Limiter 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.

Parameters

The layer1.Endpoint.Limiter prototype has the following initialisation parameters:

NameRulesTypingDefaultDescription
grammarMandatoryXML(none)
An identifier grammar definition.
idOptionalStringnull
An identifier for created logical endpoint, if omitted a unique auto-generated value it will be used.
privateOptionalBooleanfalse
If included this parameter will mark the endpoint as private and it will not be exposed outside module.
metaOptionalXMLnull(no description available)

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

<accessor>
  <prototype>layer1.Endpoint.Limiter</prototype>
  <grammar>an identifier grammar definition</grammar>
</accessor>
Import Requirements

To use Limiter accessor prototype you must import the module urn:org:netkernel:ext:layer1:

<import>
  <uri>urn:org:netkernel:ext:layer1</uri>
</import>

The Limiter is used to explicitly force the termination of request resolution. It requires a grammar parameter and for requests that match the grammar resolution will be terminated.

The limiter is a valuable infrastructure component and is used to provide constraint boundaries in the address space. For example it can be used in an application space to prevent requests that are not internally satisfied in the application address space from attempting to resolve outside that applications scope, for example in a fulcrum.

Resource Mask Example

This example shows how the limiter can be used as an export mask. Here we have a public unit test rootspace which also wishes to share all of the endpoints from the imported libraries. However it does not want to allow through the system configuration resources (such as docs, tests etc etc) that are present in the res:/etc/system/ path of the imported spaces. The Limiter masks these resources.

<rootspace public="true">
  <fileset>
    <regex>res:/etc/system/Tests.xml</regex>
  </fileset>
  <fileset>
    <regex>res:/test/.*</regex>
  </fileset>
  <endpoint>
    <prototype>Limiter</prototype>
    <grammar>
      <group>res:/etc/system/
        <regex type="anything" />
      </group>
    </grammar>
  </endpoint>
  <import>
    <uri>urn:org:netkernel:soap:core</uri>
  </import>
  <import>
    <uri>urn:org:netkernel:ext:layer1</uri>
  </import>
  <import>
    <uri>urn:org:netkernel:xml:core</uri>
  </import>
</rootspace>