Class w3c.jigsaw.resources.ContainerResource
All Packages Class Hierarchy This Package Previous Next Index
Class w3c.jigsaw.resources.ContainerResource
java.lang.Object
|
+----w3c.jigsaw.resources.AttributeHolder
|
+----w3c.jigsaw.resources.Resource
|
+----w3c.jigsaw.resources.HTTPResource
|
+----w3c.jigsaw.resources.FilteredResource
|
+----w3c.jigsaw.resources.ContainerResource
- public class ContainerResource
- extends FilteredResource
The ContainerResource is a resource that can have children.
By defining the abstract method of that class, you allow the generic
ContainerResource editor to edit the content of your sub-class.
-
ContainerResource()
-
-
createDefaultResource(String)
- Create a default child resource in that container.
-
enumerateResourceIdentifiers()
- Enumerate the children resource identifiers.
-
lookup(LookupState, LookupResult)
- Looking up inside a filtered resource.
-
lookup(String)
- Lookup a resource in that container.
-
registerResource(String, Resource, Hashtable)
- Initialize and register the given resource under the given name.
ContainerResource
public ContainerResource()
registerResource
public abstract void registerResource(String name,
Resource child,
Hashtable defs)
- Initialize and register the given resource under the given name.
This method is called by the container resource editor to add
a new child to the resource. The instance of the child is already
created, but it is left up to the container to initialize the resource
with its own set of default attributes.
- Parameters:
- name - The identifier of that resource in the container.
- child - The instantiated children resource to be added.
- defs - The set f default attribute values.
enumerateResourceIdentifiers
public abstract Enumeration enumerateResourceIdentifiers()
- Enumerate the children resource identifiers.
- Returns:
- An enumeration of String, one item per child resource. In
principle, a
lookup
on each String should return a valid
resource (except if some other thread is fidling with the container).
lookup
public abstract HTTPResource lookup(String name)
- Lookup a resource in that container.
Lookup a resource in that container.
- Parameters:
- name - The name (od identifier) of the resource to lookup.
- Returns:
- A instance of HTTPResource, or null if such
a resource doesn't exist.
createDefaultResource
public abstract HTTPResource createDefaultResource(String name)
- Create a default child resource in that container.
This method is called by the editor to add a default resource
in the container under the given name. The meaning of default
is left up to the container here.
- Parameters:
- name - The identifier for the new resource.
lookup
public boolean lookup(LookupState ls,
LookupResult lr) throws HTTPException
- Looking up inside a filtered resource.
This is the place we apply the lookup filters, if any. If a filter
knows how to compute the reply (for example, if it maintains a cache)
then, it will return a true boolean indicating
that processing this request shouldn't go further ahead (it has been
done).
- Parameters:
- ls - The lookup state.
- lr - The in-progress lookup result.
- Returns:
- A boolean true if the lookup process is done
(either becasue some reply was computed or because the target was found)
false if request lookup should continue normally.
- Throws: HTTPException
- If some error occured during lookup.
- Overrides:
- lookup in class FilteredResource
All Packages Class Hierarchy This Package Previous Next Index