Class ResourceMethodInvoker
- java.lang.Object
-
- org.glassfish.jersey.server.model.ResourceMethodInvoker
-
- All Implemented Interfaces:
ResourceInfo,Inflector<org.glassfish.jersey.server.internal.process.RequestProcessingContext,ContainerResponse>,org.glassfish.jersey.server.internal.process.Endpoint
public class ResourceMethodInvoker extends Object implements org.glassfish.jersey.server.internal.process.Endpoint, ResourceInfo
Server-side request-responseinflectorfor invoking methods of annotation-based resource classes.- Author:
- Marek Potociar, Martin Matula
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResourceMethodInvoker.BuilderResource method invoker helper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContainerResponseapply(org.glassfish.jersey.server.internal.process.RequestProcessingContext processingContext)Transform data of a given type into a result of the different type.Iterable<ReaderInterceptor>getReaderInterceptors()Get all writer interceptors applicable to theresource methodwrapped by this invoker.Iterable<RankedProvider<ContainerRequestFilter>>getRequestFilters()Get all bound request filters applicable to theresource methodwrapped by this invoker.Class<?>getResourceClass()Get the resource class that is the target of a request, ornullif this information is not available.MethodgetResourceMethod()Get the resource method that is the target of a request, ornullif this information is not available.Iterable<RankedProvider<ContainerResponseFilter>>getResponseFilters()Get all bound response filters applicable to theresource methodwrapped by this invoker.Iterable<WriterInterceptor>getWriterInterceptors()Get all reader interceptors applicable to theresource methodwrapped by this invoker.StringtoString()
-
-
-
Method Detail
-
getResourceMethod
public Method getResourceMethod()
Description copied from interface:ResourceInfoGet the resource method that is the target of a request, ornullif this information is not available.- Specified by:
getResourceMethodin interfaceResourceInfo- Returns:
- resource method instance or null
- See Also:
ResourceInfo.getResourceClass()
-
getResourceClass
public Class<?> getResourceClass()
Description copied from interface:ResourceInfoGet the resource class that is the target of a request, ornullif this information is not available.- Specified by:
getResourceClassin interfaceResourceInfo- Returns:
- resource class instance or null
- See Also:
ResourceInfo.getResourceMethod()
-
apply
public ContainerResponse apply(org.glassfish.jersey.server.internal.process.RequestProcessingContext processingContext)
Description copied from interface:InflectorTransform data of a given type into a result of the different type.- Specified by:
applyin interfaceInflector<org.glassfish.jersey.server.internal.process.RequestProcessingContext,ContainerResponse>- Parameters:
processingContext- 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 theresource methodwrapped 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 theresource methodwrapped 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 theresource methodwrapped by this invoker.- Returns:
- All reader interceptors applicable to the
resource method.
-
getReaderInterceptors
public Iterable<ReaderInterceptor> getReaderInterceptors()
Get all writer interceptors applicable to theresource methodwrapped by this invoker.- Returns:
- All writer interceptors applicable to the
resource method.
-
-