org.apache.clerezza.jaxrs.extensions
Interface RootResourceExecutor


public interface RootResourceExecutor

A class implementing a RootResourceExecutor provides functionality to handle a request directly on a specified jaxrs resource.

Author:
mir

Method Summary
 MethodResponse execute(HttpRequest request, Object resource, String subResourcePath, Map<String,String> pathParams)
          Handles a HttpRequest on a resource method of a provided jaxrs root resource.
 

Method Detail

execute

MethodResponse execute(HttpRequest request,
                       Object resource,
                       String subResourcePath,
                       Map<String,String> pathParams)
                       throws ResourceMethodException
Handles a HttpRequest on a resource method of a provided jaxrs root resource. The resource method is specified through a PathMatching object. The subResourcePath is the path of the resource method, that should be called. The argument pathParams is a Map that contains name-value pairs of path parameter of the resource class. The RootResourceExecutor service enables resources to delegate the request to other resources. Implementations typically require HttpRequest to be an instance generated by the implementation itself. The invoking resource method gets a suitable instance of HttpRequest via injection with the @Context annotation.

Parameters:
request -
resource -
subResourcePath -
pathParams - the path-parameters, additional to those in subResourcePath
Returns:
Throws:
ResourceMethodException - wrapping a checked or unchecked exception of the invoked resource method


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.