Interface ResourceAccess

All Known Implementing Classes:

public interface ResourceAccess

Provides access to read resources stored in a particular resource service. When a JRAP URL is created, the handler parses the URL to determine the components of the URL. When a connection to the URL is opened, the components of the URL are used to build a Jini Lookup Service template. The types in the template are always the following array: new Class[] {ResourceAccess.class}. The lookup template will always find services which implement the ResourceAccess interface. The JRAP handler, looks up resource access services which match the URL template. Once a client has downloaded a ResourceAccess proxy, the client can download any byte streams stored in the associated resource service. The handler delegates to downloaded resource access proxies in order to load resources for the given URL.

The JRAP URL protocol handler contains no concrete implementation of ResourceAccess. The implementation must be downloaded as part of the smart proxy of a discovered resource access service. As a result, ResourceAccess enables a layer of abstraction in the JRAP URL protocol handler which can uses flexible algorithms to obtain networked resources. Downloaded proxy classes can incorporate custom fail-over or automatic distribution algorithms, vendor specific download interfaces, etc.

Method Summary getResourceAsStream(java.lang.String name)
          Obtain an input stream for the resource with name, name.

Method Detail


public getResourceAsStream(java.lang.String name)
Obtain an input stream for the resource with name, name. name may be a '/' separated path of strings. This method is intended to operate as an analog to URLClassLoader.getResourceAsStream()
name - the name of the resource for which an inputstream will be returned.
an input stream for the resource with name, name.