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:NKPRequest
Description:issue adhoc requests to an NKP Server
Id:NKPRequest
Category:accessor
Identifier Syntax

NKPRequest is an accessor using Active URI syntax with the following base identifiers:

Base
active:NKPRequest

and the following arguments: (for more details on argument passing details see here)

ArgumentRulesTypingDescription
request
Optional
Representation (java.lang.Object)declarative request to issue
requestRep
Optional
Representation (java.lang.Object)declarative request to issue
config
Mandatory
Representation (java.lang.Object)xml resource to specify configuration of client
Request Verbs

The following verb is supported:

Verb
SOURCE
Response

The response representation of this accessor for SOURCE requests is unknown.

This accessor throws no documented exceptions.

Import Requirements

To use NKPRequest accessor you must import the module urn:com:ten60:netkernel:nkp:

<import>
  <uri>urn:com:ten60:netkernel:nkp</uri>
</import>

Operation

The NKPRequest endpoint acts as a client to a remote NKP Server but rather than importing the remote space like the NKP Client it can issue ad-hoc one-shot requests in a similar way to the layer1 accessor wormhole.

Configuration

The config argument must be specified when the NKPRequest endpoint is called. The configuration has the same form as for the bridge pattern NKP Client. In particular, it must provide the to which the request will be made.

Detailed configuration settings are covered here.

Request

The request argument must be specified and must be a declarative request.

active:NKPRequest will issue this request into the address space of the NKP server specified in the config parameter.

RequestRep

As an alternative to the request argument you can specify a requestRep argument. This is provided so you can provide a preconstructed INKFRequest, e.g.

INKFRequest nkpRequest=aContext.createRequest("active:nkpRequest");
INKFRequest toIssue=aContext.createRequest("active:myRequestToIssueRemotely");
nkpRequest.addArgumentByValue("requestRep",toIssue);

Example Use

Below is an example of a declarative request to the active:NKPRequest client...

<request>
  <identifier>active:NKPRequest</identifier>
  <argument name="request">
    <literal type="xml">
      <request>
        <identifier>res:/helloworld</identifier>
      </request>
    </literal>
  </argument>
  <argument name="config">
    <literal type="xml">
      <config>
        <hostname>some.server.com</hostname>
        <port>10601</port>
        <tls>true</tls>
      </config>
    </literal>
  </argument>
</request>

This example will issue the SOURCE request for "res:/helloworld" to the NKP address space hosted by some.server.com running the NKP server on port 10601 with TLS enabled.