| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 --> |
| <title>DataStoreProvider.Prober (Apache SIS 1.4 API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2023-10-05"> |
| <meta name="description" content="declaration: module: org.apache.sis.storage, package: org.apache.sis.storage, class: DataStoreProvider, interface: Prober"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.storage.DataStoreProvider.Prober interface"> |
| <meta name="keywords" content="test()"> |
| <meta name="keywords" content="orElse()"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../sis.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-3.6.1.min.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var pathtoroot = "../../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span></button> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="../../../../module-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</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#class">Help</a></li> |
| </ul> |
| <ul class="sub-nav-list-small"> |
| <li> |
| <p>Summary:</p> |
| <ul> |
| <li>Nested</li> |
| <li>Field</li> |
| <li>Constr</li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| </li> |
| <li> |
| <p>Detail:</p> |
| <ul> |
| <li>Field</li> |
| <li>Constr</li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div id="navbar-sub-list"> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><a href="../../../../../search.html">SEARCH</a> |
| <input type="text" id="search-input" disabled placeholder="Search"> |
| <input type="reset" id="reset-button" disabled value="reset"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="module-label-in-type">Module</span> <a href="../../../../module-summary.html">org.apache.sis.storage</a></div> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.sis.storage</a></div> |
| <h1 title="Interface DataStoreProvider.Prober" class="title">Interface DataStoreProvider.Prober<S></h1> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>S</code> - the source type as one of <code>ByteBuffer</code>, <code>DataInput</code> or other classes |
| documented in <a href="StorageConnector.html#getStorageAs(java.lang.Class)"><code>StorageConnector.getStorageAs(Class)</code></a>.</dd> |
| </dl> |
| <dl class="notes"> |
| <dt>Enclosing class:</dt> |
| <dd><code><a href="DataStoreProvider.html" title="class in org.apache.sis.storage">DataStoreProvider</a></code></dd> |
| </dl> |
| <dl class="notes"> |
| <dt>Functional Interface:</dt> |
| <dd>This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.</dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/FunctionalInterface.html" title="class or interface in java.lang" class="external-link">@FunctionalInterface</a> |
| </span><span class="modifiers">protected static interface </span><span class="element-name type-name-label">DataStoreProvider.Prober<S></span></div> |
| <div class="block">An action to execute for testing if a <a href="StorageConnector.html" title="class in org.apache.sis.storage"><code>StorageConnector</code></a> input can be read. |
| This action is invoked by <a href="DataStoreProvider.html#probeContent(org.apache.sis.storage.StorageConnector,java.lang.Class,org.apache.sis.storage.DataStoreProvider.Prober)"><code>DataStoreProvider.probeContent(StorageConnector, Class, Prober)</code></a> |
| with an input of the type <code><S></code> specified to the <code>probe(…)</code> method. |
| The <code>DataStoreProvider</code> is responsible for restoring the input to its initial position |
| after the probe action completed.</div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>1.2</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="DataStoreProvider.html#probeContent(org.apache.sis.storage.StorageConnector,java.lang.Class,org.apache.sis.storage.DataStoreProvider.Prober)"><code>DataStoreProvider.probeContent(StorageConnector, Class, Prober)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button><button id="method-summary-table-tab5" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab5', 3)" class="table-tab">Default Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default <A> <a href="DataStoreProvider.Prober.html" title="interface in org.apache.sis.storage">DataStoreProvider.Prober</a><wbr><<a href="DataStoreProvider.Prober.html" title="type parameter in DataStoreProvider.Prober">S</a>></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#orElse(java.lang.Class,org.apache.sis.storage.DataStoreProvider.Prober)" class="member-name-link">orElse</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><A> type, |
| <a href="DataStoreProvider.Prober.html" title="interface in org.apache.sis.storage">DataStoreProvider.Prober</a><? super A> alternative)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"> |
| <div class="block">Returns a composed probe that attempts, in sequence, this probe followed by the alternative probe |
| if the first probe cannot be executed.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="ProbeResult.html" title="class in org.apache.sis.storage">ProbeResult</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#test(S)" class="member-name-link">test</a><wbr>(<a href="DataStoreProvider.Prober.html" title="type parameter in DataStoreProvider.Prober">S</a> input)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Probes the given input and returns an indication about whether that input is supported.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="test(S)"> |
| <h3 id="test(java.lang.Object)">test</h3> |
| <div class="member-signature"><span class="return-type"><a href="ProbeResult.html" title="class in org.apache.sis.storage">ProbeResult</a></span> <span class="element-name">test</span><wbr><span class="parameters">(<a href="DataStoreProvider.Prober.html" title="type parameter in DataStoreProvider.Prober">S</a> input)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Exception.html" title="class or interface in java.lang" class="external-link">Exception</a></span></div> |
| <div class="block">Probes the given input and returns an indication about whether that input is supported. |
| This method may return <code>SUPPORTED</code> if there is reasonable chance of success based |
| on a brief inspection of the given input; |
| the supported status does not need to be guaranteed.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>input</code> - the input to probe. This is for example a <code>ByteBuffer</code> or a <code>DataInput</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>the result of executing the probe action with the given source. Should not be null.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Exception.html" title="class or interface in java.lang" class="external-link">Exception</a></code> - if an error occurred during the execution of the probe action.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="orElse(java.lang.Class,org.apache.sis.storage.DataStoreProvider.Prober)"> |
| <h3>orElse</h3> |
| <div class="member-signature"><span class="modifiers">default</span> <span class="type-parameters"><A></span> <span class="return-type"><a href="DataStoreProvider.Prober.html" title="interface in org.apache.sis.storage">DataStoreProvider.Prober</a><<a href="DataStoreProvider.Prober.html" title="type parameter in DataStoreProvider.Prober">S</a>></span> <span class="element-name">orElse</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><A> type, |
| <a href="DataStoreProvider.Prober.html" title="interface in org.apache.sis.storage">DataStoreProvider.Prober</a><? super A> alternative)</span></div> |
| <div class="block">Returns a composed probe that attempts, in sequence, this probe followed by the alternative probe |
| if the first probe cannot be executed. The alternative probe is tried if and only if one of the |
| following conditions is true: |
| |
| <ul> |
| <li>The storage connector cannot provide an input of the type requested by this probe.</li> |
| <li>This probe <a href="#test(S)"><code>test(S)</code></a> method returned <a href="ProbeResult.html#UNDETERMINED"><code>ProbeResult.UNDETERMINED</code></a>.</li> |
| </ul> |
| |
| If any probe throws an exception, the exception is propagated |
| (the alternative probe is not a fallback executed if this probe threw an exception).</div> |
| <dl class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>A</code> - the compile-time type of the <code>type</code> argument (the source or storage type).</dd> |
| <dt>Parameters:</dt> |
| <dd><code>type</code> - the desired type as one of <code>ByteBuffer</code>, <code>DataInput</code>, <i>etc</i>.</dd> |
| <dd><code>alternative</code> - the test to apply on the source of the given type.</dd> |
| <dt>Returns:</dt> |
| <dd>a composed probe that attempts the given probe if this probe cannot be executed.</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| </div> |
| </div> |
| </body> |
| </html> |