@ApplicationScoped public final class RequestHandlerProxy extends RequestHandlerBase
| Modifier and Type | Class and Description |
|---|---|
static class |
RequestHandlerProxy.GroupAfterInterceptor |
static class |
RequestHandlerProxy.GroupExceptionInterceptor |
static class |
RequestHandlerProxy.GroupFinallyInterceptor |
static class |
RequestHandlerProxy.GroupInterceptorWithResult |
Destroyable.Util| Modifier and Type | Field and Description |
|---|---|
static RequestHandlerProxy.GroupAfterInterceptor |
GLOBAL_AFTER_INTERCEPTOR |
static RequestHandlerProxy.GroupInterceptorWithResult |
GLOBAL_BEFORE_INTERCEPTOR |
static RequestHandlerProxy.GroupExceptionInterceptor |
GLOBAL_EXCEPTION_INTERCEPTOR |
static RequestHandlerProxy.GroupFinallyInterceptor |
GLOBAL_FINALLY_INTERCEPTOR |
| Constructor and Description |
|---|
RequestHandlerProxy(java.lang.String actionMethodName,
App app) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Handler.Visitor visitor) |
java.lang.String |
action() |
ControllerAction |
actionHandler() |
org.osgl.mvc.result.BadRequest |
badRequestOnMethod(java.lang.String message) |
java.lang.String |
controller() |
CORS.Spec |
corsSpec()
Get CORS specification that specifically applied to this request handler
|
CSRF.Spec |
csrfSpec()
Get CSRF specification that applied to this request handler
|
boolean |
express(ActionContext context)
Indicate the handler logic is fast enough to be put into network layer’s io thread and does not require to dispatch to worker thread.
|
void |
handle(ActionContext context)
Invoke handler upon an action context
|
static <T extends Handler> |
insertInterceptor(org.osgl.util.C.List<T> list,
T i) |
org.osgl.mvc.result.NotFound |
notFoundOnMethod(java.lang.String message) |
void |
prepareAuthentication(ActionContext context)
Setting up handler for authentication.
|
protected void |
registerAfterInterceptor(AfterInterceptor interceptor) |
protected void |
registerBeforeInterceptor(BeforeInterceptor interceptor) |
protected void |
registerExceptionInterceptor(ExceptionInterceptor interceptor) |
protected void |
registerFinallyInterceptor(FinallyInterceptor interceptor) |
static void |
registerGlobalInterceptor(AfterInterceptor interceptor) |
static void |
registerGlobalInterceptor(BeforeInterceptor interceptor) |
static void |
registerGlobalInterceptor(ExceptionInterceptor interceptor) |
static void |
registerGlobalInterceptor(FinallyInterceptor interceptor) |
static void |
registerGlobalInterceptor(GroupInterceptorMetaInfo freeStyleInterceptor) |
static void |
registerGlobalInterceptor(InterceptorMethodMetaInfo interceptor,
InterceptorType type) |
static void |
registerGlobalInterceptors(java.lang.Class<?> interceptorClass) |
static void |
releaseGlobalResources() |
protected void |
releaseResources() |
boolean |
sessionFree()
Returns if the handler is session free or not.
|
java.lang.String |
toString() |
apply, destroy, isDestroyed, noContextResoving, realHandler, requireResolveContext, scope, setExpress, setSessionFree, supportPartialPath, wrappublic static final RequestHandlerProxy.GroupInterceptorWithResult GLOBAL_BEFORE_INTERCEPTOR
public static final RequestHandlerProxy.GroupAfterInterceptor GLOBAL_AFTER_INTERCEPTOR
public static final RequestHandlerProxy.GroupFinallyInterceptor GLOBAL_FINALLY_INTERCEPTOR
public static final RequestHandlerProxy.GroupExceptionInterceptor GLOBAL_EXCEPTION_INTERCEPTOR
@Inject
public RequestHandlerProxy(java.lang.String actionMethodName,
App app)
protected void releaseResources()
releaseResources in class RequestHandlerBasepublic static void releaseGlobalResources()
public java.lang.String controller()
public java.lang.String action()
public ControllerAction actionHandler()
public org.osgl.mvc.result.NotFound notFoundOnMethod(java.lang.String message)
public org.osgl.mvc.result.BadRequest badRequestOnMethod(java.lang.String message)
public void handle(ActionContext context)
RequestHandlerInvoke handler upon an action context
context - the context datapublic boolean sessionFree()
RequestHandlerReturns if the handler is session free or not. If a handler is session free then the framework will NOT resolve session
sessionFree in interface RequestHandlersessionFree in class RequestHandlerBasetrue if the handler is session freepublic void prepareAuthentication(ActionContext context)
RequestHandlerSetting up handler for authentication. For example, initialize the missing authentication handler, csrf failure handler.
context - the current action contextpublic boolean express(ActionContext context)
RequestHandlerIndicate the handler logic is fast enough to be put into network layer’s io thread and does not require to dispatch to worker thread.
Note a handler that implements ExpressHandler should always return true for this method
express in interface RequestHandlerexpress in class RequestHandlerBasecontext - the action contexttrue if this handler support direct io thread processingprotected final void registerBeforeInterceptor(BeforeInterceptor interceptor)
protected final void registerAfterInterceptor(AfterInterceptor interceptor)
protected final void registerExceptionInterceptor(ExceptionInterceptor interceptor)
protected final void registerFinallyInterceptor(FinallyInterceptor interceptor)
public void accept(Handler.Visitor visitor)
public CSRF.Spec csrfSpec()
RequestHandlerGet CSRF specification that applied to this request handler
csrfSpec in interface RequestHandlercsrfSpec in class RequestHandlerBasepublic CORS.Spec corsSpec()
RequestHandlerGet CORS specification that specifically applied to this request handler
corsSpec in interface RequestHandlercorsSpec in class RequestHandlerBasepublic java.lang.String toString()
toString in class java.lang.Objectpublic static void registerGlobalInterceptor(GroupInterceptorMetaInfo freeStyleInterceptor)
public static void registerGlobalInterceptor(InterceptorMethodMetaInfo interceptor, InterceptorType type)
public static void registerGlobalInterceptor(BeforeInterceptor interceptor)
public static void registerGlobalInterceptor(AfterInterceptor interceptor)
public static void registerGlobalInterceptor(FinallyInterceptor interceptor)
public static void registerGlobalInterceptor(ExceptionInterceptor interceptor)
public static void registerGlobalInterceptors(java.lang.Class<?> interceptorClass)
public static <T extends Handler> void insertInterceptor(org.osgl.util.C.List<T> list, T i)
Copyright © 2014–2017 ActFramework. All rights reserved.