类 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

public class StaticHandlerImpl extends Object implements io.vertx.ext.web.handler.StaticHandler
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 only
    StaticHandlerImpl(io.vertx.ext.web.handler.FileSystemAccess visibility, String staticRootDirectory)
    Constructor called by static factory method
  • 方法概要

    修饰符和类型
    方法
    说明
    getFile(String path, io.vertx.ext.web.RoutingContext context)
     
    void
    handle(io.vertx.ext.web.RoutingContext context)
     
    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
    io.vertx.ext.web.handler.StaticHandler
    setAllowRootFileSystemAccess(boolean allowRootFileSystemAccess)
    已过时。
    - Use the parameters in constructor
    io.vertx.ext.web.handler.StaticHandler
    setAlwaysAsyncFS(boolean alwaysAsyncFS)
     
    io.vertx.ext.web.handler.StaticHandler
    setCacheEntryTimeout(long timeout)
     
    io.vertx.ext.web.handler.StaticHandler
    setCachingEnabled(boolean enabled)
     
    io.vertx.ext.web.handler.StaticHandler
     
    io.vertx.ext.web.handler.StaticHandler
    setDirectoryListing(boolean directoryListing)
     
    io.vertx.ext.web.handler.StaticHandler
    setDirectoryTemplate(String directoryTemplate)
     
    io.vertx.ext.web.handler.StaticHandler
    setEnableFSTuning(boolean enableFSTuning)
     
    io.vertx.ext.web.handler.StaticHandler
    setEnableRangeSupport(boolean enableRangeSupport)
     
    io.vertx.ext.web.handler.StaticHandler
    setFilesReadOnly(boolean readOnly)
     
    io.vertx.ext.web.handler.StaticHandler
    setHttp2PushMapping(List<io.vertx.ext.web.Http2PushMapping> http2PushMap)
     
    io.vertx.ext.web.handler.StaticHandler
    setIncludeHidden(boolean includeHidden)
     
    io.vertx.ext.web.handler.StaticHandler
    setIndexPage(String indexPage)
     
    io.vertx.ext.web.handler.StaticHandler
    setMaxAgeSeconds(long maxAgeSeconds)
     
    io.vertx.ext.web.handler.StaticHandler
    setMaxAvgServeTimeNs(long maxAvgServeTimeNanoSeconds)
     
    io.vertx.ext.web.handler.StaticHandler
    setMaxCacheSize(int maxCacheSize)
     
    io.vertx.ext.web.handler.StaticHandler
    setSendVaryHeader(boolean sendVaryHeader)
     
    io.vertx.ext.web.handler.StaticHandler
    setWebRoot(String webRoot)
    已过时。
    - Use the parameters in constructor
    io.vertx.ext.web.handler.StaticHandler
     
    io.vertx.ext.web.handler.StaticHandler
     

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • 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 ROOT
      staticRootDirectory - 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

      @Deprecated public io.vertx.ext.web.handler.StaticHandler setWebRoot(String webRoot)
      已过时。
      - 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

      public io.vertx.ext.web.handler.StaticHandler setDirectoryTemplate(String directoryTemplate)
      指定者:
      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

      public io.vertx.ext.web.handler.StaticHandler setIndexPage(String indexPage)
      指定者:
      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

      public io.vertx.ext.web.handler.StaticHandler skipCompressionForMediaTypes(Set<String> mediaTypes)
      指定者:
      skipCompressionForMediaTypes 在接口中 io.vertx.ext.web.handler.StaticHandler
    • skipCompressionForSuffixes

      public io.vertx.ext.web.handler.StaticHandler skipCompressionForSuffixes(Set<String> fileSuffixes)
      指定者:
      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

      public io.vertx.ext.web.handler.StaticHandler setDefaultContentEncoding(String contentEncoding)
      指定者:
      setDefaultContentEncoding 在接口中 io.vertx.ext.web.handler.StaticHandler
    • getFile

      public String getFile(String path, io.vertx.ext.web.RoutingContext context)