Class ResourceContainer
- java.lang.Object
-
- org.simpleframework.http.resource.ResourceContainer
-
- All Implemented Interfaces:
Container
public class ResourceContainer extends java.lang.Object implements Container
TheResourceContainer
is an implementation of theContainer
interface for handling an arbitrary set of resources. This container will accept any HTTP transaction and delegate the processing of that transation to a resource. This resolves the resource to use using an implementation of theResourceEngine
interface.This provides a very simple means to manage individual targets using separate resource implementations. It also provides an ideal location to introduce path mapping functionality.
- Author:
- Niall Gallagher
-
-
Constructor Summary
Constructors Constructor Description ResourceContainer(ResourceEngine engine)
Constructor for theResourceContainer
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handle(Request req, Response resp)
This method is where most of the work is done to retrieve theResource
and process the HTTP request.
-
-
-
Constructor Detail
-
ResourceContainer
public ResourceContainer(ResourceEngine engine)
Constructor for theResourceContainer
object. This requires a resource engine which it uses to map the request targets to a given implementation or instance. This is essentially a router to theResource
objects that have been mapped to a given request path.- Parameters:
engine
- the engine used to resolve resources
-
-