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 CompositeResourceFinderprivate 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 TypeMethodDescriptionvoidclose()Default implementation of#close()which does nothing.booleanhasNext()next()open()Open current resource.private voidprocessPaths(String... paths) voidreset()Reset theResourceFinderinstance.Methods inherited from class AbstractResourceFinderAdapter
removeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:ResourceFinderOpen current resource.- Returns:
- input stream from which current resource can be loaded.
-
close
public void close()Description copied from class:AbstractResourceFinderAdapterDefault implementation of#close()which does nothing.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceResourceFinder- Overrides:
closein classAbstractResourceFinderAdapter
-
reset
public void reset()Description copied from interface:ResourceFinderReset theResourceFinderinstance. Upon calling this method the implementing class MUST reset its internal state to the initial state.
-