All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.tools.resources.ResourceContext

java.lang.Object
   |
   +----org.w3c.tools.resources.ResourceContext

public class ResourceContext
extends Object
The resource context.


Variable Index

 o container
The ResourceReference of the resource container.
 o debug
debug flag
 o modules
The set of registered modules.
 o parent
Our parent context, if any.
 o reference
The ResourceReference of our resource.
 o server
The server of that resource context.
 o space
Our Resource Space.

Constructor Index

 o ResourceContext(ContainerResource)
Create a ResourceContext from a container.
 o ResourceContext(ResourceContext)
Create a ResourceContext from the parent context.
 o ResourceContext(ResourceReference)
Create a ResourceContext from a container ResourceReference.
 o ResourceContext(ResourceSpace, ServerInterface)
Create a ResourceContext.
 o ResourceContext(ServerInterface)
Create a ResourceContext.

Method Index

 o getContainer()
Get the container of the resource.
 o getModule(String)
Lookup a module within that context, and up the hierarchy of contexts.
 o getModule(String, boolean)
Lookup a module within that resource context.
 o getParent()
Get that context's ancestor.
 o getResourceReference()
Get the ResourceReference of the resource.
 o getServer()
Get the server this context is attached to.
 o getSpace()
Get our Resource Space.
 o registerModule(String, Object)
Register a module within that resource context.
 o setResourceReference(ResourceReference)
Set the ResourceReference of the resource.
 o setSpace(ResourceSpace)
Set the Resource Space.
 o toString()

Variables

 o debug
 public static boolean debug
debug flag

 o parent
 protected ResourceContext parent
Our parent context, if any.

 o modules
 public Hashtable modules
The set of registered modules.

 o space
 protected ResourceSpace space
Our Resource Space.

 o server
 protected ServerInterface server
The server of that resource context.

 o reference
 protected ResourceReference reference
The ResourceReference of our resource.

 o container
 protected ResourceReference container
The ResourceReference of the resource container.

Constructors

 o ResourceContext
 public ResourceContext(ContainerResource container)
Create a ResourceContext from a container.

Parameters:
container - The resource container.
 o ResourceContext
 public ResourceContext(ResourceReference rr_container)
Create a ResourceContext from a container ResourceReference.

Parameters:
container - The resource reference of the container. Must be an instance of ContainerResource.
 o ResourceContext
 public ResourceContext(ResourceContext parent)
Create a ResourceContext from the parent context.

Parameters:
parent - The parent resource context.
 o ResourceContext
 public ResourceContext(ResourceSpace space,
                        ServerInterface server)
Create a ResourceContext.

Parameters:
space - The ResourceSpace.
server - The server.
 o ResourceContext
 public ResourceContext(ServerInterface server)
Create a ResourceContext.

Parameters:
server - The server.

Methods

 o getContainer
 public ResourceReference getContainer()
Get the container of the resource.

Returns:
A ResourceReference instance.
 o getResourceReference
 public ResourceReference getResourceReference()
Get the ResourceReference of the resource.

Returns:
a ResourceReference instance.
 o setResourceReference
 public void setResourceReference(ResourceReference reference)
Set the ResourceReference of the resource.

Parameters:
reference - The ResourceReference to set.
 o getSpace
 public ResourceSpace getSpace()
Get our Resource Space.

Returns:
A ResourceSpace instance.
 o setSpace
 public void setSpace(ResourceSpace space)
Set the Resource Space.

Parameters:
space - Our Resource Space.
 o getServer
 public ServerInterface getServer()
Get the server this context is attached to.

Returns:
An ServerInterface instance (guaranteed not to be null.)
 o getParent
 public ResourceContext getParent()
Get that context's ancestor.

Returns:
A ResourceContext instance, or null.
 o registerModule
 public synchronized void registerModule(String name,
                                         Object impl)
Register a module within that resource context.

Parameters:
name - The module's name.
impl - The module's implementation.
 o getModule
 public Object getModule(String name,
                         boolean inherited)
Lookup a module within that resource context.

Parameters:
name - Name of the module to look for.
inherited - Also look within the contexts hierarchy for an inherited module having that name.
 o getModule
 public Object getModule(String name)
Lookup a module within that context, and up the hierarchy of contexts.

Parameters:
name - The module's name.
Returns:
An object implementing that module.
 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index