org.glassfish.jersey.server.model
Class ResourceMethodInvoker

java.lang.Object
  extended by org.glassfish.jersey.server.model.ResourceMethodInvoker
All Implemented Interfaces:
ResourceInfo, Inflector<ContainerRequest,ContainerResponse>, Endpoint

public class ResourceMethodInvoker
extends Object
implements Endpoint, ResourceInfo

Server-side request-response inflector for invoking methods of annotation-based resource classes.

Author:
Marek Potociar (marek.potociar at oracle.com), Martin Matula (martin.matula at oracle.com)

Nested Class Summary
static class ResourceMethodInvoker.Builder
          Resource method invoker "assisted" injection helper.
 
Method Summary
 ContainerResponse apply(ContainerRequest requestContext)
          Transform data of a given type into a result of the different type.
 Iterable<ReaderInterceptor> getReaderInterceptors()
          Get all writer interceptors applicable to the resource method wrapped by this invoker.
 Iterable<RankedProvider<ContainerRequestFilter>> getRequestFilters()
          Get all bound request filters applicable to the resource method wrapped by this invoker.
 Class<?> getResourceClass()
          Get the resource class that is the target of a request, or null if this information is not available.
 Method getResourceMethod()
          Get the resource method that is the target of a request, or null if this information is not available.
 Iterable<RankedProvider<ContainerResponseFilter>> getResponseFilters()
          Get all bound response filters applicable to the resource method wrapped by this invoker.
 Iterable<WriterInterceptor> getWriterInterceptors()
          Get all reader interceptors applicable to the resource method wrapped by this invoker.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getResourceMethod

public Method getResourceMethod()
Description copied from interface: ResourceInfo
Get the resource method that is the target of a request, or null if this information is not available.

Specified by:
getResourceMethod in interface ResourceInfo
Returns:
resource method instance or null
See Also:
ResourceInfo.getResourceClass()

getResourceClass

public Class<?> getResourceClass()
Description copied from interface: ResourceInfo
Get the resource class that is the target of a request, or null if this information is not available.

Specified by:
getResourceClass in interface ResourceInfo
Returns:
resource class instance or null
See Also:
ResourceInfo.getResourceMethod()

apply

public ContainerResponse apply(ContainerRequest requestContext)
Description copied from interface: Inflector
Transform data of a given type into a result of the different type.

Specified by:
apply in interface Inflector<ContainerRequest,ContainerResponse>
Parameters:
requestContext - data to be transformed into a result.
Returns:
data transformation result. Return value must not be null.

getRequestFilters

public Iterable<RankedProvider<ContainerRequestFilter>> getRequestFilters()
Get all bound request filters applicable to the resource method wrapped by this invoker.

Returns:
All bound (dynamically or by name) request filters applicable to the resource method.

getResponseFilters

public Iterable<RankedProvider<ContainerResponseFilter>> getResponseFilters()
Get all bound response filters applicable to the resource method wrapped by this invoker.

Returns:
All bound (dynamically or by name) response filters applicable to the resource method.

getWriterInterceptors

public Iterable<WriterInterceptor> getWriterInterceptors()
Get all reader interceptors applicable to the resource method wrapped by this invoker.

Returns:
All reader interceptors applicable to the resource method.

getReaderInterceptors

public Iterable<ReaderInterceptor> getReaderInterceptors()
Get all writer interceptors applicable to the resource method wrapped by this invoker.

Returns:
All writer interceptors applicable to the resource method.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.