public class StaticResourceGetter extends FastRequestHandler
Unlike a StaticFileGetter, the StaticResourceGetter read resource from jar packages
Destroyable.UtilDUMB, logger| Constructor and Description |
|---|
StaticResourceGetter(java.lang.String base) |
| Modifier and Type | Method and Description |
|---|---|
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
|
protected void |
handle(java.lang.String path,
ActionContext context) |
protected void |
releaseResources() |
boolean |
supportPartialPath()
Indicate if this request handler support partial path lookup.
|
java.lang.String |
toString() |
csrfSpec, prepareAuthentication, requireResolveContext, sessionFreeapply, corsSpec, destroy, isDestroyed, noContextResoving, realHandler, scope, setExpress, setSessionFree, wrapprotected void releaseResources()
releaseResources in class RequestHandlerBasepublic 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 processingpublic void handle(ActionContext context)
RequestHandlerInvoke handler upon an action context
context - the context dataprotected void handle(java.lang.String path,
ActionContext context)
public boolean supportPartialPath()
RequestHandlerIndicate if this request handler support partial path lookup. Usually this method should return false. However for certain request handler like StaticFileGetter they need to support partial path lookup. Take the example of the following route mapping:
GET /public staticDir: /public which map url path /public to a StaticFileGetter with base dir set to /public, it needs to support all path starts with “/public”, like “/public/js/jquery.js” etc.supportPartialPath in interface RequestHandlersupportPartialPath in class RequestHandlerBasetrue if the request handler support partial path lookup or false otherwisepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2014–2017 ActFramework. All rights reserved.