Package net.jrouter.http.netty
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接口对象。-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDefaultServletActionFactory 属性。Nested classes/interfaces inherited from class net.jrouter.impl.PathActionFactory
net.jrouter.impl.PathActionFactory.ColonString, net.jrouter.impl.PathActionFactory.StringPathGeneratorNested classes/interfaces inherited from class net.jrouter.impl.AbstractActionFactory
net.jrouter.impl.AbstractActionFactory.DefaultActionFilter, net.jrouter.impl.AbstractActionFactory.DefaultObjectFactoryNested classes/interfaces inherited from interface net.jrouter.http.netty.HttpServerActionFactory
HttpServerActionFactory.DefaultHttpActionFactory, HttpServerActionFactory.DefaultHttpActionInvocation -
Constructor Summary
ConstructorsConstructorDescriptionConstructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected net.jrouter.ActionInvocation<String>createActionInvocation(String path, Object... params) 创建并返回ChannelHandlerContext接口对象。<T> TinvokeAction(String path, io.netty.handler.codec.http.FullHttpRequest request, io.netty.handler.codec.http.FullHttpResponse response, io.netty.channel.ChannelHandlerContext sc) Use this instead ofActionFactory.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, invokeResultMethods inherited from class net.jrouter.impl.AbstractActionFactory
addInterceptor, addInterceptors, addInterceptorStack, addInterceptorStacks, addResult, addResults, addResultTypes, getActionFilter, getConverterFactory, getInterceptors, getInterceptorStacks, getMethodChecker, getMethodInvokerFactory, getObjectFactory, getResults, getResultTypes, invokeAwareInterfacesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.jrouter.ActionFactory
clear, getActionFilter, getActions, getConverterFactory, getDefaultInterceptorStack, getDefaultResultType, getInterceptors, getInterceptorStacks, getMethodInvokerFactory, getObjectFactory, getPathGenerator, getResults, getResultTypes, invokeAction
-
Constructor Details
-
DefaultHttpActionFactory
public DefaultHttpActionFactory(HttpServerActionFactory.DefaultHttpActionFactory.Properties properties) Constructor.- Parameters:
properties- Properties
-
-
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:HttpServerActionFactoryUse this instead ofActionFactory.invokeAction(Object, Object...)to pass Http parameters.- Specified by:
invokeActionin interfaceHttpServerActionFactory- 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:
createActionInvocationin classnet.jrouter.impl.PathActionFactory- Returns:
ChannelHandlerContext接口对象。
-