Class ServletActionFactory.DefaultServletActionFactory

java.lang.Object
net.jrouter.impl.AbstractActionFactory<String>
net.jrouter.impl.PathActionFactory
net.jrouter.impl.PathActionFactory.ColonString
net.jrouter.http.servlet.ServletActionFactory.DefaultServletActionFactory
All Implemented Interfaces:
net.jrouter.ActionFactory<String>, ServletActionFactory
Direct Known Subclasses:
ObjectHandlerActionFactory
Enclosing interface:
ServletActionFactory

public static class ServletActionFactory.DefaultServletActionFactory extends net.jrouter.impl.PathActionFactory.ColonString implements ServletActionFactory
提供ServletActionFactory接口默认实现。覆写createActionInvocation(java.lang.String, java.lang.Object...)方法创建ServletActionFactory接口对象。
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    DefaultServletActionFactory 属性。

    Nested classes/interfaces inherited from class net.jrouter.impl.PathActionFactory

    net.jrouter.impl.PathActionFactory.ColonString, net.jrouter.impl.PathActionFactory.StringPathGenerator

    Nested classes/interfaces inherited from class net.jrouter.impl.AbstractActionFactory

    net.jrouter.impl.AbstractActionFactory.DefaultActionFilter, net.jrouter.impl.AbstractActionFactory.DefaultObjectFactory

    Nested classes/interfaces inherited from interface net.jrouter.http.servlet.ServletActionFactory

    ServletActionFactory.DefaultServletActionFactory, ServletActionFactory.DefaultServletActionInvocation
  • Constructor Summary

    Constructors
  • Method Summary

    Modifier and Type
    Method
    Description
    protected net.jrouter.ActionInvocation<String>
    创建并返回ServletActionInvocation接口对象。
    <T> T
    invokeAction(String path, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.ServletContext sc)
    Use this instead of ActionFactory.invokeAction(Object, Object...) to pass Http parameters.

    Methods inherited from class net.jrouter.impl.PathActionFactory.ColonString

    getDefaultStringResultType, invokeResult, invokeStringResult

    Methods inherited from class net.jrouter.impl.PathActionFactory

    addAction, addActions, addResultType, clear, clearActionCache, getActionCache, getActionCacheNumber, getActions, getDefaultInterceptorStack, getDefaultResultType, getExtension, getPathGenerator, getPathMatcher, getPathSeparator, invokeAction

    Methods inherited from class net.jrouter.impl.AbstractActionFactory

    addInterceptor, addInterceptors, addInterceptorStack, addInterceptorStacks, addResult, addResults, addResultTypes, getActionFilter, getConverterFactory, getInterceptors, getInterceptorStacks, getMethodChecker, getMethodInvokerFactory, getObjectFactory, getResults, getResultTypes, invokeAwareInterfaces

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.jrouter.ActionFactory

    clear, getActionFilter, getActions, getConverterFactory, getDefaultInterceptorStack, getDefaultResultType, getInterceptors, getInterceptorStacks, getMethodInvokerFactory, getObjectFactory, getPathGenerator, getResults, getResultTypes, invokeAction
  • Constructor Details

  • Method Details

    • invokeAction

      public <T> T invokeAction(String path, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.ServletContext sc) throws net.jrouter.JRouterException
      Description copied from interface: ServletActionFactory
      Use this instead of ActionFactory.invokeAction(Object, Object...) to pass Http parameters.
      Specified by:
      invokeAction in interface ServletActionFactory
      Type Parameters:
      T - Generic type.
      Parameters:
      path - Action path.
      request - HttpServletRequest.
      response - HttpServletResponse.
      sc - ServletContext.
      Returns:
      Action invoked result.
      Throws:
      net.jrouter.JRouterException - if error occurrs.
      See Also:
      • ActionFactory.invokeAction(Object, Object...)
    • createActionInvocation

      protected net.jrouter.ActionInvocation<String> createActionInvocation(String path, Object... params)
      创建并返回ServletActionInvocation接口对象。
      Overrides:
      createActionInvocation in class net.jrouter.impl.PathActionFactory
      Returns:
      ServletActionInvocation接口对象。