cn.dreampie.route.core
类 Route

java.lang.Object
  继承者 cn.dreampie.route.core.Route

public class Route
extends Object

Created by ice on 14-12-19.


字段摘要
static String PARAM_PATTERN
           
 
构造方法摘要
Route(Class<? extends Resource> resourceClass, ParamAttribute paramAttribute, String httpMethod, String pathPattern, Method method, Interceptor[] interceptors, String des, Validator[] validators, MultipartBuilder multipartBuilder)
           
 
方法摘要
 List<Type> getAllGenericParamTypes()
           
 int[] getAllLineNumbers()
           
 List<String> getAllParamNames()
           
 List<Class<?>> getAllParamTypes()
           
 String getHttpMethod()
           
 Interceptor[] getInterceptors()
           
 Method getMethod()
           
 MultipartBuilder getMultipartBuilder()
           
 List<String> getPathParamNames()
           
 String getPathPattern()
           
 String getPattern()
           
 Class<? extends Resource> getResourceClass()
           
 String getStdPathPattern()
           
 Validator[] getValidators()
           
 RouteMatch match(HttpRequest request, HttpResponse response)
          匹配路由
 void throwException(Throwable throwable)
          抛出异常
 String toString()
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

PARAM_PATTERN

public static final String PARAM_PATTERN
另请参见:
常量字段值
构造方法详细信息

Route

public Route(Class<? extends Resource> resourceClass,
             ParamAttribute paramAttribute,
             String httpMethod,
             String pathPattern,
             Method method,
             Interceptor[] interceptors,
             String des,
             Validator[] validators,
             MultipartBuilder multipartBuilder)
方法详细信息

match

public RouteMatch match(HttpRequest request,
                        HttpResponse response)
匹配路由

参数:
request - request对象
response - response对象
返回:
route

toString

public String toString()
覆盖:
Object 中的 toString

getResourceClass

public Class<? extends Resource> getResourceClass()

getMethod

public Method getMethod()

getHttpMethod

public String getHttpMethod()

getPattern

public String getPattern()

getPathPattern

public String getPathPattern()

getStdPathPattern

public String getStdPathPattern()

getPathParamNames

public List<String> getPathParamNames()

getAllParamNames

public List<String> getAllParamNames()

getAllParamTypes

public List<Class<?>> getAllParamTypes()

getAllGenericParamTypes

public List<Type> getAllGenericParamTypes()

getInterceptors

public Interceptor[] getInterceptors()

getValidators

public Validator[] getValidators()

getAllLineNumbers

public int[] getAllLineNumbers()

getMultipartBuilder

public MultipartBuilder getMultipartBuilder()

throwException

public void throwException(Throwable throwable)
抛出异常

参数:
throwable -


Copyright © 2015. All rights reserved.