Class HttpServerActionFactory.DefaultHttpActionFactory

java.lang.Object
net.jrouter.impl.AbstractActionFactory<String>
net.jrouter.impl.PathActionFactory
net.jrouter.http.netty.HttpServerActionFactory.DefaultHttpActionFactory
All Implemented Interfaces:
net.jrouter.ActionFactory<String>, HttpServerActionFactory
Enclosing interface:
HttpServerActionFactory

public static class HttpServerActionFactory.DefaultHttpActionFactory extends net.jrouter.impl.PathActionFactory implements HttpServerActionFactory
提供ServletActionFactory接口默认实现。覆写createActionInvocation(java.lang.String, java.lang.Object...)方法创建HttpServerActionFactory接口对象。
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
  • Constructor Summary

    Constructors
  • Method Summary

    Modifier and Type
    Method
    Description
    protected net.jrouter.ActionInvocation<String>
    创建并返回ChannelHandlerContext接口对象。
    <T> T
    invokeAction(String path, io.netty.handler.codec.http.FullHttpRequest request, io.netty.handler.codec.http.FullHttpResponse response, io.netty.channel.ChannelHandlerContext sc)
    Use this instead of ActionFactory.invokeAction(Object, Object...) to pass Http parameters.

    Methods inherited from class net.jrouter.impl.PathActionFactory

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

    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, io.netty.handler.codec.http.FullHttpRequest request, io.netty.handler.codec.http.FullHttpResponse response, io.netty.channel.ChannelHandlerContext sc) throws net.jrouter.JRouterException
      Description copied from interface: HttpServerActionFactory
      Use this instead of ActionFactory.invokeAction(Object, Object...) to pass Http parameters.
      Specified by:
      invokeAction in interface HttpServerActionFactory
      Type Parameters:
      T - Generic type.
      Parameters:
      path - Action path.
      request - FullHttpRequest.
      response - FullHttpResponse.
      sc - ChannelHandlerContext.
      Returns:
      Action invoked result.
      Throws:
      net.jrouter.JRouterException - if error occurs.
      See Also:
      • ActionFactory.invokeAction(Object, Object...)
    • createActionInvocation

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