Class ResourceContainer
java.lang.Object
org.simpleframework.http.resource.ResourceContainer
- All Implemented Interfaces:
Container
The
ResourceContainer is an implementation of the
Container 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
the ResourceEngine 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
ConstructorsConstructorDescriptionResourceContainer(ResourceEngine engine) Constructor for theResourceContainerobject. -
Method Summary
-
Constructor Details
-
ResourceContainer
Constructor for theResourceContainerobject. 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 theResourceobjects that have been mapped to a given request path.- Parameters:
engine- the engine used to resolve resources
-
-
Method Details
-
handle
This method is where most of the work is done to retrieve theResourceand process the HTTP request. This will basically use theresolvemethod of the issuedResourceEngineto acquire resources.
-