Package org.glassfish.jersey.servlet
Class WebAppResourcesScanner
java.lang.Object
org.glassfish.jersey.server.internal.AbstractResourceFinderAdapter
org.glassfish.jersey.servlet.WebAppResourcesScanner
- All Implemented Interfaces:
AutoCloseable
,Iterator<String>
,ResourceFinder
A scanner that recursively scans resources within a Web application.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CompositeResourceFinder
private static final String[]
private final javax.servlet.ServletContext
-
Constructor Summary
ConstructorsConstructorDescriptionWebAppResourcesScanner
(javax.servlet.ServletContext sc) Scan from a set of web resource paths. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Default implementation of#close()
which does nothing.boolean
hasNext()
next()
open()
Open current resource.private void
processPaths
(String... paths) void
reset()
Reset theResourceFinder
instance.Methods inherited from class org.glassfish.jersey.server.internal.AbstractResourceFinderAdapter
remove
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
paths
-
sc
private final javax.servlet.ServletContext sc -
compositeResourceFinder
-
-
Constructor Details
-
WebAppResourcesScanner
WebAppResourcesScanner(javax.servlet.ServletContext sc) Scan from a set of web resource paths.- Parameters:
sc
-ServletContext
.
-
-
Method Details
-
processPaths
-
hasNext
public boolean hasNext() -
next
-
open
Description copied from interface:ResourceFinder
Open current resource.- Returns:
- input stream from which current resource can be loaded.
-
close
public void close()Description copied from class:AbstractResourceFinderAdapter
Default implementation of#close()
which does nothing.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceResourceFinder
- Overrides:
close
in classAbstractResourceFinderAdapter
-
reset
public void reset()Description copied from interface:ResourceFinder
Reset theResourceFinder
instance. Upon calling this method the implementing class MUST reset its internal state to the initial state.
-