Class AllowedResourceAliasChecker

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
      • Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

        org.eclipse.jetty.util.component.LifeCycle.Listener
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.nio.file.Path _base  
      protected static java.nio.file.LinkOption[] FOLLOW_LINKS  
      protected static java.nio.file.LinkOption[] NO_FOLLOW_LINKS  
      • Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean check​(java.lang.String pathInContext, java.nio.file.Path path)  
      boolean check​(java.lang.String pathInContext, org.eclipse.jetty.util.resource.Resource resource)
      Check an alias
      protected void doStart()  
      protected void doStop()  
      protected ContextHandler getContextHandler()  
      protected java.nio.file.Path getPath​(org.eclipse.jetty.util.resource.Resource resource)  
      protected void initialize()  
      protected boolean isAllowed​(java.nio.file.Path path)  
      protected boolean isSameFile​(java.nio.file.Path path1, java.nio.file.Path path2)  
      java.lang.String toString()  
      • Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • FOLLOW_LINKS

        protected static final java.nio.file.LinkOption[] FOLLOW_LINKS
      • NO_FOLLOW_LINKS

        protected static final java.nio.file.LinkOption[] NO_FOLLOW_LINKS
      • _base

        protected java.nio.file.Path _base
    • Constructor Detail

      • AllowedResourceAliasChecker

        public AllowedResourceAliasChecker​(ContextHandler contextHandler)
        Parameters:
        contextHandler - the context handler to use.
    • Method Detail

      • initialize

        protected void initialize()
      • doStart

        protected void doStart()
                        throws java.lang.Exception
        Overrides:
        doStart in class org.eclipse.jetty.util.component.AbstractLifeCycle
        Throws:
        java.lang.Exception
      • doStop

        protected void doStop()
                       throws java.lang.Exception
        Overrides:
        doStop in class org.eclipse.jetty.util.component.AbstractLifeCycle
        Throws:
        java.lang.Exception
      • check

        public boolean check​(java.lang.String pathInContext,
                             org.eclipse.jetty.util.resource.Resource resource)
        Description copied from interface: ContextHandler.AliasCheck
        Check an alias
        Specified by:
        check in interface ContextHandler.AliasCheck
        Parameters:
        pathInContext - The path the aliased resource was created for
        resource - The aliased resourced
        Returns:
        True if the resource is OK to be served.
      • check

        protected boolean check​(java.lang.String pathInContext,
                                java.nio.file.Path path)
      • isAllowed

        protected boolean isAllowed​(java.nio.file.Path path)
      • isSameFile

        protected boolean isSameFile​(java.nio.file.Path path1,
                                     java.nio.file.Path path2)
      • getPath

        protected java.nio.file.Path getPath​(org.eclipse.jetty.util.resource.Resource resource)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class org.eclipse.jetty.util.component.AbstractLifeCycle