类 StaticHandlerImpl
java.lang.Object
cool.scx.mvc._hack.StaticHandlerImpl
- 所有已实现的接口:
io.vertx.core.Handler<io.vertx.ext.web.RoutingContext>,io.vertx.ext.web.handler.StaticHandler
- 直接已知子类:
SendFileHelper
Copy From
StaticHandlerImpl Make Some private to public so we can Override
Static web server
Parts derived from Yoke- 作者:
- Tim Fox, Paulo Lopes, Stephan Wissel
-
字段概要
从接口继承的字段 io.vertx.ext.web.handler.StaticHandler
DEFAULT_ALWAYS_ASYNC_FS, DEFAULT_CACHE_ENTRY_TIMEOUT, DEFAULT_CACHING_ENABLED, DEFAULT_DIRECTORY_LISTING, DEFAULT_DIRECTORY_TEMPLATE, DEFAULT_ENABLE_FS_TUNING, DEFAULT_FILES_READ_ONLY, DEFAULT_INCLUDE_HIDDEN, DEFAULT_INDEX_PAGE, DEFAULT_MAX_AGE_SECONDS, DEFAULT_MAX_AVG_SERVE_TIME_NS, DEFAULT_MAX_CACHE_SIZE, DEFAULT_RANGE_SUPPORT, DEFAULT_ROOT_FILESYSTEM_ACCESS, DEFAULT_SEND_VARY_HEADER, DEFAULT_WEB_ROOT -
构造器概要
构造器构造器说明Default constructor with DEFAULT_WEB_ROOT and relative file access onlyStaticHandlerImpl(io.vertx.ext.web.handler.FileSystemAccess visibility, String staticRootDirectory) Constructor called by static factory method -
方法概要
修饰符和类型方法说明voidhandle(io.vertx.ext.web.RoutingContext context) voidsendStatic(io.vertx.ext.web.RoutingContext context, io.vertx.core.file.FileSystem fileSystem, String path, boolean index) Can be called recursive for index pagesio.vertx.ext.web.handler.StaticHandlersetAllowRootFileSystemAccess(boolean allowRootFileSystemAccess) 已过时。- Use the parameters in constructorio.vertx.ext.web.handler.StaticHandlersetAlwaysAsyncFS(boolean alwaysAsyncFS) io.vertx.ext.web.handler.StaticHandlersetCacheEntryTimeout(long timeout) io.vertx.ext.web.handler.StaticHandlersetCachingEnabled(boolean enabled) io.vertx.ext.web.handler.StaticHandlersetDefaultContentEncoding(String contentEncoding) io.vertx.ext.web.handler.StaticHandlersetDirectoryListing(boolean directoryListing) io.vertx.ext.web.handler.StaticHandlersetDirectoryTemplate(String directoryTemplate) io.vertx.ext.web.handler.StaticHandlersetEnableFSTuning(boolean enableFSTuning) io.vertx.ext.web.handler.StaticHandlersetEnableRangeSupport(boolean enableRangeSupport) io.vertx.ext.web.handler.StaticHandlersetFilesReadOnly(boolean readOnly) io.vertx.ext.web.handler.StaticHandlersetHttp2PushMapping(List<io.vertx.ext.web.Http2PushMapping> http2PushMap) io.vertx.ext.web.handler.StaticHandlersetIncludeHidden(boolean includeHidden) io.vertx.ext.web.handler.StaticHandlersetIndexPage(String indexPage) io.vertx.ext.web.handler.StaticHandlersetMaxAgeSeconds(long maxAgeSeconds) io.vertx.ext.web.handler.StaticHandlersetMaxAvgServeTimeNs(long maxAvgServeTimeNanoSeconds) io.vertx.ext.web.handler.StaticHandlersetMaxCacheSize(int maxCacheSize) io.vertx.ext.web.handler.StaticHandlersetSendVaryHeader(boolean sendVaryHeader) io.vertx.ext.web.handler.StaticHandlersetWebRoot(String webRoot) 已过时。- Use the parameters in constructorio.vertx.ext.web.handler.StaticHandlerskipCompressionForMediaTypes(Set<String> mediaTypes) io.vertx.ext.web.handler.StaticHandlerskipCompressionForSuffixes(Set<String> fileSuffixes)
-
构造器详细资料
-
StaticHandlerImpl
public StaticHandlerImpl(io.vertx.ext.web.handler.FileSystemAccess visibility, String staticRootDirectory) Constructor called by static factory method- 参数:
visibility- path specified by root is RELATIVE or ROOTstaticRootDirectory- path on host with static file location
-
StaticHandlerImpl
public StaticHandlerImpl()Default constructor with DEFAULT_WEB_ROOT and relative file access only
-
-
方法详细资料
-
handle
public void handle(io.vertx.ext.web.RoutingContext context) - 指定者:
handle在接口中io.vertx.core.Handler<io.vertx.ext.web.RoutingContext>
-
sendStatic
public void sendStatic(io.vertx.ext.web.RoutingContext context, io.vertx.core.file.FileSystem fileSystem, String path, boolean index) Can be called recursive for index pages -
setAllowRootFileSystemAccess
@Deprecated public io.vertx.ext.web.handler.StaticHandler setAllowRootFileSystemAccess(boolean allowRootFileSystemAccess) 已过时。- Use the parameters in constructor- 指定者:
setAllowRootFileSystemAccess在接口中io.vertx.ext.web.handler.StaticHandler
-
setWebRoot
已过时。- Use the parameters in constructor- 指定者:
setWebRoot在接口中io.vertx.ext.web.handler.StaticHandler
-
setFilesReadOnly
public io.vertx.ext.web.handler.StaticHandler setFilesReadOnly(boolean readOnly) - 指定者:
setFilesReadOnly在接口中io.vertx.ext.web.handler.StaticHandler
-
setMaxAgeSeconds
public io.vertx.ext.web.handler.StaticHandler setMaxAgeSeconds(long maxAgeSeconds) - 指定者:
setMaxAgeSeconds在接口中io.vertx.ext.web.handler.StaticHandler
-
setMaxCacheSize
public io.vertx.ext.web.handler.StaticHandler setMaxCacheSize(int maxCacheSize) - 指定者:
setMaxCacheSize在接口中io.vertx.ext.web.handler.StaticHandler
-
setCachingEnabled
public io.vertx.ext.web.handler.StaticHandler setCachingEnabled(boolean enabled) - 指定者:
setCachingEnabled在接口中io.vertx.ext.web.handler.StaticHandler
-
setDirectoryListing
public io.vertx.ext.web.handler.StaticHandler setDirectoryListing(boolean directoryListing) - 指定者:
setDirectoryListing在接口中io.vertx.ext.web.handler.StaticHandler
-
setDirectoryTemplate
- 指定者:
setDirectoryTemplate在接口中io.vertx.ext.web.handler.StaticHandler
-
setEnableRangeSupport
public io.vertx.ext.web.handler.StaticHandler setEnableRangeSupport(boolean enableRangeSupport) - 指定者:
setEnableRangeSupport在接口中io.vertx.ext.web.handler.StaticHandler
-
setIncludeHidden
public io.vertx.ext.web.handler.StaticHandler setIncludeHidden(boolean includeHidden) - 指定者:
setIncludeHidden在接口中io.vertx.ext.web.handler.StaticHandler
-
setCacheEntryTimeout
public io.vertx.ext.web.handler.StaticHandler setCacheEntryTimeout(long timeout) - 指定者:
setCacheEntryTimeout在接口中io.vertx.ext.web.handler.StaticHandler
-
setIndexPage
- 指定者:
setIndexPage在接口中io.vertx.ext.web.handler.StaticHandler
-
setAlwaysAsyncFS
public io.vertx.ext.web.handler.StaticHandler setAlwaysAsyncFS(boolean alwaysAsyncFS) - 指定者:
setAlwaysAsyncFS在接口中io.vertx.ext.web.handler.StaticHandler
-
setHttp2PushMapping
public io.vertx.ext.web.handler.StaticHandler setHttp2PushMapping(List<io.vertx.ext.web.Http2PushMapping> http2PushMap) - 指定者:
setHttp2PushMapping在接口中io.vertx.ext.web.handler.StaticHandler
-
skipCompressionForMediaTypes
- 指定者:
skipCompressionForMediaTypes在接口中io.vertx.ext.web.handler.StaticHandler
-
skipCompressionForSuffixes
- 指定者:
skipCompressionForSuffixes在接口中io.vertx.ext.web.handler.StaticHandler
-
setEnableFSTuning
public io.vertx.ext.web.handler.StaticHandler setEnableFSTuning(boolean enableFSTuning) - 指定者:
setEnableFSTuning在接口中io.vertx.ext.web.handler.StaticHandler
-
setMaxAvgServeTimeNs
public io.vertx.ext.web.handler.StaticHandler setMaxAvgServeTimeNs(long maxAvgServeTimeNanoSeconds) - 指定者:
setMaxAvgServeTimeNs在接口中io.vertx.ext.web.handler.StaticHandler
-
setSendVaryHeader
public io.vertx.ext.web.handler.StaticHandler setSendVaryHeader(boolean sendVaryHeader) - 指定者:
setSendVaryHeader在接口中io.vertx.ext.web.handler.StaticHandler
-
setDefaultContentEncoding
- 指定者:
setDefaultContentEncoding在接口中io.vertx.ext.web.handler.StaticHandler
-
getFile
-