Module
urn:org:ten60:netkernel:ext:layer1
Definition
Layer1 provides several data accessors for interacting with standard URI
address spaces.
Format
file:.* |
A resource available from the local filesystem. All NetKernel
request types can used with a file: resource - SOURCE, SINK, NEW,
EXISTS, DELETE. |
jar:.* |
A resource available inside a jar or zip which is
accessible either using file: or http: For example
jar:file:/archive.jar!/module.xml .
Only SOURCE requests can be issued against a jar: uri. |
http:.* |
A resource accessed using the HTTP protocol. Only SOURCE
requests can be issued against a http: uri. |
HTTP Notes
Layer1's support for the http: scheme is a basic HTTP client service
which allows http: to be used to source resources. A
full-featured HTTP-client library module
is provided for power use.
An optional argument (with any name) can be passed to a http: request and this resource will be serialized as the
body of a POST request. Without any argument a GET request will be issued.
Limitations of Layer1's http:
This basic http: implementation uses the standard Java java.net.URLConnection
.
By default the timeout period for URLConnection network requests is very high - if you wish to change
these defaults you must set Java system properties for the JVM,
for more information see:
http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html
. URLConnection is not ideal since a
request which is blocked in an http request cannot be interrupted. We recommend that in applications
which require full control of an HTTP-client you use the HTTP-client module.