org.cruxframework.crux.core.server.rest.core.dispatch
Class ResourceMethod

java.lang.Object
  extended by org.cruxframework.crux.core.server.rest.core.dispatch.ResourceMethod

public class ResourceMethod
extends Object

Author:
Thiago da Rosa de Bustamante

Nested Class Summary
static class ResourceMethod.MethodReturn
           
 
Field Summary
protected  CacheInfo cacheInfo
           
protected  CorsData corsData
           
protected  Map<String,String> exceptionIds
           
protected  Map<String,org.codehaus.jackson.map.ObjectWriter> exceptionWriters
           
protected  Type genericReturnType
           
protected  boolean hasReturnType
           
protected  String httpMethod
           
protected  JsonPData jsonPData
           
protected  Method method
           
protected  MethodInvoker methodInvoker
           
protected  Class<?> resourceClass
           
protected  org.codehaus.jackson.map.ObjectWriter writer
           
 
Constructor Summary
ResourceMethod(Class<?> clazz, Method method, String httpMethod)
           
 
Method Summary
 boolean checkCorsPermissions(HttpRequest request, HttpResponse response, boolean preflightRequest)
           
 void forceEtagGeneration()
           
 Type getGenericReturnType()
           
 String getHttpMethod()
           
 Method getMethod()
           
 Annotation[] getMethodAnnotations()
           
 Class<?> getResourceClass()
           
 ResourceMethod.MethodReturn invoke(HttpRequest request, HttpResponse response)
           
 boolean isEtagGenerationEnabled()
           
 void setCorsAllowedMethods(List<String> methods)
           
 boolean supportsCors()
           
 boolean supportsJsonP()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

httpMethod

protected String httpMethod

method

protected Method method

resourceClass

protected Class<?> resourceClass

genericReturnType

protected Type genericReturnType

methodInvoker

protected MethodInvoker methodInvoker

writer

protected org.codehaus.jackson.map.ObjectWriter writer

exceptionWriters

protected Map<String,org.codehaus.jackson.map.ObjectWriter> exceptionWriters

exceptionIds

protected Map<String,String> exceptionIds

cacheInfo

protected CacheInfo cacheInfo

hasReturnType

protected boolean hasReturnType

jsonPData

protected JsonPData jsonPData

corsData

protected CorsData corsData
Constructor Detail

ResourceMethod

public ResourceMethod(Class<?> clazz,
                      Method method,
                      String httpMethod)
Method Detail

supportsCors

public boolean supportsCors()

supportsJsonP

public boolean supportsJsonP()

setCorsAllowedMethods

public void setCorsAllowedMethods(List<String> methods)

getGenericReturnType

public Type getGenericReturnType()

getResourceClass

public Class<?> getResourceClass()

getMethodAnnotations

public Annotation[] getMethodAnnotations()

getMethod

public Method getMethod()

forceEtagGeneration

public void forceEtagGeneration()

isEtagGenerationEnabled

public boolean isEtagGenerationEnabled()

invoke

public ResourceMethod.MethodReturn invoke(HttpRequest request,
                                          HttpResponse response)

getHttpMethod

public String getHttpMethod()

checkCorsPermissions

public boolean checkCorsPermissions(HttpRequest request,
                                    HttpResponse response,
                                    boolean preflightRequest)


Copyright © 2015. All rights reserved.