jrouter.servlet
类 ObjectHandlerActionFactory

java.lang.Object
  继承者 jrouter.impl.AbstractActionFactory<String>
      继承者 jrouter.impl.PathActionFactory
          继承者 jrouter.servlet.ServletActionFactory.DefaultServletActionFactory
              继承者 jrouter.servlet.ObjectHandlerActionFactory
所有已实现的接口:
jrouter.ActionFactory<String>, ServletActionFactory

public class ObjectHandlerActionFactory
extends ServletActionFactory.DefaultServletActionFactory

提供非String类型的结果类型处理, 及可配置的类型Class -> 结果类型ResultTypeProxy映射。


嵌套类摘要
 
从类 jrouter.impl.AbstractActionFactory 继承的嵌套类/接口
jrouter.impl.AbstractActionFactory.DefaultObjectFactory
 
从接口 jrouter.servlet.ServletActionFactory 继承的嵌套类/接口
ServletActionFactory.DefaultServletActionFactory, ServletActionFactory.DefaultServletActionInvocation
 
构造方法摘要
ObjectHandlerActionFactory(Map<String,Object> properties)
          根据指定的键值映射构造初始化数据的ObjectHandlerActionFactory对象。
 
方法摘要
protected  Object invokeObjectResult(jrouter.ActionInvocation invocation, Object res)
           
protected  Object invokeUndefinedResult(jrouter.ActionInvocation invocation, String resInfo)
           
 void setDefaultObjectHandler(jrouter.impl.ResultTypeProxy defaultObjectHandler)
          设置默认非String类型对象的结果类型处理对象。
 void setObjectResultTypes(Map<Class,jrouter.impl.ResultTypeProxy> objectResultTypes)
          设置(结果对象的类型:结果类型对象)的映射关系。
 
从类 jrouter.servlet.ServletActionFactory.DefaultServletActionFactory 继承的方法
buildActionPath, createActionInvocation, invokeAction, isActionPathCaseSensitive
 
从类 jrouter.impl.PathActionFactory 继承的方法
addAction, addActions, clear, clearActionCache, getActionCache, getActionCacheNumber, getActionFilter, getActions, getExtension, getPathSeparator, invokeAction
 
从类 jrouter.impl.AbstractActionFactory 继承的方法
addInterceptor, addInterceptors, addInterceptorStack, addInterceptorStacks, addResult, addResults, addResultType, addResultTypes, createDefaultConverterFactory, createDefaultObjectFactory, getConverterFactory, getDefaultInterceptorStack, getDefaultResultType, getInterceptors, getInterceptorStacks, getMethodChecker, getMethodInvokerFactory, getObjectFactory, getResults, getResultTypes, loadComponent
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 jrouter.ActionFactory 继承的方法
clear, getActions, getConverterFactory, getDefaultInterceptorStack, getDefaultResultType, getInterceptors, getInterceptorStacks, getMethodInvokerFactory, getObjectFactory, getResults, getResultTypes, invokeAction
 

构造方法详细信息

ObjectHandlerActionFactory

public ObjectHandlerActionFactory(Map<String,Object> properties)
根据指定的键值映射构造初始化数据的ObjectHandlerActionFactory对象。

参数:
properties - 指定的初始化数据键值映射。
方法详细信息

invokeObjectResult

protected Object invokeObjectResult(jrouter.ActionInvocation invocation,
                                    Object res)
覆盖:
jrouter.impl.PathActionFactory 中的 invokeObjectResult

invokeUndefinedResult

protected Object invokeUndefinedResult(jrouter.ActionInvocation invocation,
                                       String resInfo)
覆盖:
jrouter.impl.PathActionFactory 中的 invokeUndefinedResult

setDefaultObjectHandler

public void setDefaultObjectHandler(jrouter.impl.ResultTypeProxy defaultObjectHandler)
设置默认非String类型对象的结果类型处理对象。 注意即使设置了String类型的对象也并不会调用invokeObjectResult方法。

参数:
defaultObjectHandler - 非String对象的结果类型处理对象。
另请参见:
invokeObjectResult(jrouter.ActionInvocation, java.lang.Object)

setObjectResultTypes

public void setObjectResultTypes(Map<Class,jrouter.impl.ResultTypeProxy> objectResultTypes)
设置(结果对象的类型:结果类型对象)的映射关系。

参数:
objectResultTypes - (结果对象的类型:结果类型对象)的映射关系。


Copyright © 2017. All rights reserved.