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 .

Name:Virtual Host
Description:Delegate requests into distinct spaces based on identifier
Category:accessor prototype

Virtual Host 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 mod.architecture.VirtualHost prototype has the following initialisation parameters:

configMandatoryIdentifier or XML(none)
specifies virtual hosts and the imports they map to

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

  <config>specifies virtual hosts and the imports they map to</config>
Import Requirements

To use Virtual Host accessor prototype you must import the module urn:com:ten60:netkernel:mod:architecture:



When a virtual host endpoint is instantiated from the prototype in your application space it creates a set of logical endpoints, one for each host you have defined in the configuration. Each logical endpoint is backed by a space which dynamically imports all the spaces which match the import-type using SimpleImportDiscovery. When a request is matched by the logical endpoint a new request is constructed and delegated into the backing space. This new request is constructed according the a declarative request definition and should contain captured arguments from virtual hosts grammar definition.


The virtual host endpoint requires a mandatory config parameter which defines a set of one or more virtual hosts. This configuration document specifies an XML resource which may be specified as a literal within the module definition or referenced as an identifier. The config document must have the following structure:

    <grammar> [grammar definition] </grammar>
    <request> [declarative requests definition] </request>
    <import-type> [type of spaces import] </import-type>
  </host> ...more host definitions...

Each host definition must contain a: