blob: 47ee1e3719cdbd29dd455fb10e3c1e53e75e15ee [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.10) on Fri Feb 26 09:50:23 CST 2021 -->
<title>Scanner (Jetty :: Project 9.4.38.v20210224 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2021-02-26">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Scanner (Jetty :: Project 9.4.38.v20210224 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":42,"i4":10,"i5":10,"i6":10,"i7":42,"i8":42,"i9":10,"i10":10,"i11":10,"i12":42,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":42,"i23":42,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Scanner.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.eclipse.jetty.util</a></div>
<h2 title="Class Scanner" class="title">Class Scanner</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">org.eclipse.jetty.util.component.AbstractLifeCycle</a></li>
<li>
<ul class="inheritance">
<li>org.eclipse.jetty.util.Scanner</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="component/LifeCycle.html" title="interface in org.eclipse.jetty.util.component">LifeCycle</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">Scanner</span>
extends <a href="component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></pre>
<div class="block">Scanner
Utility for scanning a directory for added, removed and changed
files and reporting these events via registered Listeners.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Scanner.BulkListener.html" title="interface in org.eclipse.jetty.util">Scanner.BulkListener</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Scanner.DiscreteListener.html" title="interface in org.eclipse.jetty.util">Scanner.DiscreteListener</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Scanner.Listener.html" title="interface in org.eclipse.jetty.util">Scanner.Listener</a></span></code></th>
<td class="colLast">
<div class="block">Listener
Marker for notifications re file changes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Scanner.Notification.html" title="enum in org.eclipse.jetty.util">Scanner.Notification</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Scanner.ScanCycleListener.html" title="interface in org.eclipse.jetty.util">Scanner.ScanCycleListener</a></span></code></th>
<td class="colLast">
<div class="block">Listener that notifies when a scan has started and when it has ended.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Scanner.ScanListener.html" title="interface in org.eclipse.jetty.util">Scanner.ScanListener</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.org.eclipse.jetty.util.component.AbstractLifeCycle">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;org.eclipse.jetty.util.component.<a href="component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></h3>
<code><a href="component/AbstractLifeCycle.AbstractLifeCycleListener.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle.AbstractLifeCycleListener</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_SCAN_DEPTH">DEFAULT_SCAN_DEPTH</a></span></code></th>
<td class="colLast">
<div class="block">When walking a directory, a depth of 1 ensures that
the directory's descendants are visited, not just the
directory itself (as a file).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#MAX_SCAN_DEPTH">MAX_SCAN_DEPTH</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.eclipse.jetty.util.component.AbstractLifeCycle">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.eclipse.jetty.util.component.<a href="component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></h3>
<code><a href="component/AbstractLifeCycle.html#FAILED">FAILED</a>, <a href="component/AbstractLifeCycle.html#RUNNING">RUNNING</a>, <a href="component/AbstractLifeCycle.html#STARTED">STARTED</a>, <a href="component/AbstractLifeCycle.html#STARTING">STARTING</a>, <a href="component/AbstractLifeCycle.html#STOPPED">STOPPED</a>, <a href="component/AbstractLifeCycle.html#STOPPING">STOPPING</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">Scanner</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="IncludeExcludeSet.html" title="class in org.eclipse.jetty.util">IncludeExcludeSet</a>&lt;java.nio.file.PathMatcher,&#8203;java.nio.file.Path&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addDirectory(java.nio.file.Path)">addDirectory</a></span>&#8203;(java.nio.file.Path&nbsp;p)</code></th>
<td class="colLast">
<div class="block">Add a directory to be scanned.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addFile(java.nio.file.Path)">addFile</a></span>&#8203;(java.nio.file.Path&nbsp;p)</code></th>
<td class="colLast">
<div class="block">Add a file to be scanned.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addListener(org.eclipse.jetty.util.Scanner.Listener)">addListener</a></span>&#8203;(<a href="Scanner.Listener.html" title="interface in org.eclipse.jetty.util">Scanner.Listener</a>&nbsp;listener)</code></th>
<td class="colLast">
<div class="block">Add an added/removed/changed listener</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addScanDir(java.io.File)">addScanDir</a></span>&#8203;(java.io.File&nbsp;dir)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doStart()">doStart</a></span>()</code></th>
<td class="colLast">
<div class="block">Start the scanning action.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doStop()">doStop</a></span>()</code></th>
<td class="colLast">
<div class="block">Stop the scanning.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#exists(java.lang.String)">exists</a></span>&#8203;(java.lang.String&nbsp;path)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.io.FilenameFilter</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getFilenameFilter()">getFilenameFilter</a></span>()</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRecursive()">getRecursive</a></span>()</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getReportDirs()">getReportDirs</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getReportExistingFilesOnStartup()">getReportExistingFilesOnStartup</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getScanDepth()">getScanDepth</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the scanDepth.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>java.util.List&lt;java.io.File&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getScanDirs()">getScanDirs</a></span>()</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getScanInterval()">getScanInterval</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the scan interval</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>java.util.Set&lt;java.nio.file.Path&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getScannables()">getScannables</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>java.util.Timer</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newTimer()">newTimer</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>java.util.TimerTask</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newTimerTask()">newTimerTask</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeListener(org.eclipse.jetty.util.Scanner.Listener)">removeListener</a></span>&#8203;(<a href="Scanner.Listener.html" title="interface in org.eclipse.jetty.util">Scanner.Listener</a>&nbsp;listener)</code></th>
<td class="colLast">
<div class="block">Remove a registered listener</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reset()">reset</a></span>()</code></th>
<td class="colLast">
<div class="block">Clear the list of scannables.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#scan()">scan</a></span>()</code></th>
<td class="colLast">
<div class="block">Perform a pass of the scanner and report changes</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#scanFiles()">scanFiles</a></span>()</code></th>
<td class="colLast">
<div class="block">Scan all of the given paths.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#schedule()">schedule</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setFilenameFilter(java.io.FilenameFilter)">setFilenameFilter</a></span>&#8203;(java.io.FilenameFilter&nbsp;filter)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setRecursive(boolean)">setRecursive</a></span>&#8203;(boolean&nbsp;recursive)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setReportDirs(boolean)">setReportDirs</a></span>&#8203;(boolean&nbsp;dirs)</code></th>
<td class="colLast">
<div class="block">Set if found directories should be reported.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setReportExistingFilesOnStartup(boolean)">setReportExistingFilesOnStartup</a></span>&#8203;(boolean&nbsp;reportExisting)</code></th>
<td class="colLast">
<div class="block">Whether or not an initial scan will report all files as being
added.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setScanDepth(int)">setScanDepth</a></span>&#8203;(int&nbsp;scanDepth)</code></th>
<td class="colLast">
<div class="block">Set the scanDepth.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setScanDirs(java.util.List)">setScanDirs</a></span>&#8203;(java.util.List&lt;java.io.File&gt;&nbsp;dirs)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setScanInterval(int)">setScanInterval</a></span>&#8203;(int&nbsp;scanInterval)</code></th>
<td class="colLast">
<div class="block">Set the scan interval</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.eclipse.jetty.util.component.AbstractLifeCycle">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.eclipse.jetty.util.component.<a href="component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></h3>
<code><a href="component/AbstractLifeCycle.html#addLifeCycleListener(org.eclipse.jetty.util.component.LifeCycle.Listener)">addLifeCycleListener</a>, <a href="component/AbstractLifeCycle.html#getState()">getState</a>, <a href="component/AbstractLifeCycle.html#getState(org.eclipse.jetty.util.component.LifeCycle)">getState</a>, <a href="component/AbstractLifeCycle.html#getStopTimeout()">getStopTimeout</a>, <a href="component/AbstractLifeCycle.html#isFailed()">isFailed</a>, <a href="component/AbstractLifeCycle.html#isRunning()">isRunning</a>, <a href="component/AbstractLifeCycle.html#isStarted()">isStarted</a>, <a href="component/AbstractLifeCycle.html#isStarting()">isStarting</a>, <a href="component/AbstractLifeCycle.html#isStopped()">isStopped</a>, <a href="component/AbstractLifeCycle.html#isStopping()">isStopping</a>, <a href="component/AbstractLifeCycle.html#removeLifeCycleListener(org.eclipse.jetty.util.component.LifeCycle.Listener)">removeLifeCycleListener</a>, <a href="component/AbstractLifeCycle.html#setStopTimeout(long)">setStopTimeout</a>, <a href="component/AbstractLifeCycle.html#start()">start</a>, <a href="component/AbstractLifeCycle.html#stop()">stop</a>, <a href="component/AbstractLifeCycle.html#toString()">toString</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="DEFAULT_SCAN_DEPTH">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_SCAN_DEPTH</h4>
<pre>public static final&nbsp;int DEFAULT_SCAN_DEPTH</pre>
<div class="block">When walking a directory, a depth of 1 ensures that
the directory's descendants are visited, not just the
directory itself (as a file).</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>FileVisitor.preVisitDirectory(java.nio.file.Path, java.nio.file.attribute.BasicFileAttributes)</code>,
<a href="../../../../constant-values.html#org.eclipse.jetty.util.Scanner.DEFAULT_SCAN_DEPTH">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="MAX_SCAN_DEPTH">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>MAX_SCAN_DEPTH</h4>
<pre>public static final&nbsp;int MAX_SCAN_DEPTH</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.eclipse.jetty.util.Scanner.MAX_SCAN_DEPTH">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Scanner</h4>
<pre>public&nbsp;Scanner()</pre>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getScanInterval()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getScanInterval</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getScanInterval()</pre>
<div class="block">Get the scan interval</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>interval between scans in seconds</dd>
</dl>
</li>
</ul>
<a id="setScanInterval(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setScanInterval</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setScanInterval&#8203;(int&nbsp;scanInterval)</pre>
<div class="block">Set the scan interval</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scanInterval</code> - pause between scans in seconds, or 0 for no scan after the initial scan.</dd>
</dl>
</li>
</ul>
<a id="setScanDirs(java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setScanDirs</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setScanDirs&#8203;(java.util.List&lt;java.io.File&gt;&nbsp;dirs)</pre>
</li>
</ul>
<a id="addScanDir(java.io.File)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addScanDir</h4>
<pre class="methodSignature">@Deprecated
public&nbsp;void&nbsp;addScanDir&#8203;(java.io.File&nbsp;dir)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
</li>
</ul>
<a id="addFile(java.nio.file.Path)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addFile</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;addFile&#8203;(java.nio.file.Path&nbsp;p)
throws java.io.IOException</pre>
<div class="block">Add a file to be scanned. The file must not be null, and must exist.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>p</code> - the Path of the file to scan.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a id="addDirectory(java.nio.file.Path)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addDirectory</h4>
<pre class="methodSignature">public&nbsp;<a href="IncludeExcludeSet.html" title="class in org.eclipse.jetty.util">IncludeExcludeSet</a>&lt;java.nio.file.PathMatcher,&#8203;java.nio.file.Path&gt;&nbsp;addDirectory&#8203;(java.nio.file.Path&nbsp;p)
throws java.io.IOException</pre>
<div class="block">Add a directory to be scanned. The directory must not be null and must exist.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>p</code> - the directory to scan.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an IncludeExcludeSet to which the caller can add PathMatcher patterns to match</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a id="getScanDirs()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getScanDirs</h4>
<pre class="methodSignature">@Deprecated
public&nbsp;java.util.List&lt;java.io.File&gt;&nbsp;getScanDirs()</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
</li>
</ul>
<a id="getScannables()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getScannables</h4>
<pre class="methodSignature">public&nbsp;java.util.Set&lt;java.nio.file.Path&gt;&nbsp;getScannables()</pre>
</li>
</ul>
<a id="setRecursive(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRecursive</h4>
<pre class="methodSignature">@Deprecated
public&nbsp;void&nbsp;setRecursive&#8203;(boolean&nbsp;recursive)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>recursive</code> - True if scanning is recursive</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#setScanDepth(int)"><code>setScanDepth(int)</code></a></dd>
</dl>
</li>
</ul>
<a id="getRecursive()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRecursive</h4>
<pre class="methodSignature">@Deprecated
public&nbsp;boolean&nbsp;getRecursive()</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if scanning is recursive</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#getScanDepth()"><code>getScanDepth()</code></a></dd>
</dl>
</li>
</ul>
<a id="getScanDepth()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getScanDepth</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getScanDepth()</pre>
<div class="block">Get the scanDepth.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the scanDepth</dd>
</dl>
</li>
</ul>
<a id="setScanDepth(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setScanDepth</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setScanDepth&#8203;(int&nbsp;scanDepth)</pre>
<div class="block">Set the scanDepth.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scanDepth</code> - the scanDepth to set</dd>
</dl>
</li>
</ul>
<a id="setFilenameFilter(java.io.FilenameFilter)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFilenameFilter</h4>
<pre class="methodSignature">@Deprecated
public&nbsp;void&nbsp;setFilenameFilter&#8203;(java.io.FilenameFilter&nbsp;filter)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
<div class="block">Apply a filter to files found in the scan directory.
Only files matching the filter will be reported as added/changed/removed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filter</code> - the filename filter to use</dd>
</dl>
</li>
</ul>
<a id="getFilenameFilter()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFilenameFilter</h4>
<pre class="methodSignature">@Deprecated
public&nbsp;java.io.FilenameFilter&nbsp;getFilenameFilter()</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
<div class="block">Get any filter applied to files in the scan dir.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the filename filter</dd>
</dl>
</li>
</ul>
<a id="setReportExistingFilesOnStartup(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setReportExistingFilesOnStartup</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setReportExistingFilesOnStartup&#8203;(boolean&nbsp;reportExisting)</pre>
<div class="block">Whether or not an initial scan will report all files as being
added.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reportExisting</code> - if true, all files found on initial scan will be
reported as being added, otherwise not</dd>
</dl>
</li>
</ul>
<a id="getReportExistingFilesOnStartup()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReportExistingFilesOnStartup</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;getReportExistingFilesOnStartup()</pre>
</li>
</ul>
<a id="setReportDirs(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setReportDirs</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setReportDirs&#8203;(boolean&nbsp;dirs)</pre>
<div class="block">Set if found directories should be reported.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dirs</code> - true to report directory changes as well</dd>
</dl>
</li>
</ul>
<a id="getReportDirs()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReportDirs</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;getReportDirs()</pre>
</li>
</ul>
<a id="addListener(org.eclipse.jetty.util.Scanner.Listener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addListener</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;addListener&#8203;(<a href="Scanner.Listener.html" title="interface in org.eclipse.jetty.util">Scanner.Listener</a>&nbsp;listener)</pre>
<div class="block">Add an added/removed/changed listener</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>listener</code> - the listener to add</dd>
</dl>
</li>
</ul>
<a id="removeListener(org.eclipse.jetty.util.Scanner.Listener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeListener</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;removeListener&#8203;(<a href="Scanner.Listener.html" title="interface in org.eclipse.jetty.util">Scanner.Listener</a>&nbsp;listener)</pre>
<div class="block">Remove a registered listener</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>listener</code> - the Listener to be removed</dd>
</dl>
</li>
</ul>
<a id="doStart()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doStart</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;doStart()</pre>
<div class="block">Start the scanning action.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="component/AbstractLifeCycle.html#doStart()">doStart</a></code>&nbsp;in class&nbsp;<code><a href="component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></code></dd>
</dl>
</li>
</ul>
<a id="newTimerTask()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newTimerTask</h4>
<pre class="methodSignature">public&nbsp;java.util.TimerTask&nbsp;newTimerTask()</pre>
</li>
</ul>
<a id="newTimer()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newTimer</h4>
<pre class="methodSignature">public&nbsp;java.util.Timer&nbsp;newTimer()</pre>
</li>
</ul>
<a id="schedule()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>schedule</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;schedule()</pre>
</li>
</ul>
<a id="doStop()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doStop</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;doStop()</pre>
<div class="block">Stop the scanning.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="component/AbstractLifeCycle.html#doStop()">doStop</a></code>&nbsp;in class&nbsp;<code><a href="component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></code></dd>
</dl>
</li>
</ul>
<a id="reset()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;reset()</pre>
<div class="block">Clear the list of scannables. The scanner must first
be in the stopped state.</div>
</li>
</ul>
<a id="exists(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exists</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;exists&#8203;(java.lang.String&nbsp;path)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>path</code> - tests if the path exists</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the path exists in one of the scandirs</dd>
</dl>
</li>
</ul>
<a id="scan()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scan</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;scan()</pre>
<div class="block">Perform a pass of the scanner and report changes</div>
</li>
</ul>
<a id="scanFiles()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>scanFiles</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;scanFiles()</pre>
<div class="block">Scan all of the given paths.</div>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Scanner.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 1995&#x2013;2021 <a href="https://webtide.com">Webtide</a>. All rights reserved.</small></p>
</footer>
</body>
</html>