| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (17) --> |
| <title>Engine (Qpid ProtonJ2 Parent 1.0.0-M19 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="description" content="declaration: package: org.apache.qpid.protonj2.engine, interface: Engine"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var evenRowColor = "even-row-color"; |
| var oddRowColor = "odd-row-color"; |
| var tableTab = "table-tab"; |
| var activeTableTab = "active-table-tab"; |
| </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"> |
| <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="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="class-use/Engine.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div> |
| <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> |
| <!-- ========= 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="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.qpid.protonj2.engine</a></div> |
| <h1 title="Interface Engine" class="title">Interface Engine</h1> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Superinterfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link">Consumer</a><<a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>></code></dd> |
| </dl> |
| <dl class="notes"> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><code><a href="impl/ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">Engine</span><span class="extends-implements"> |
| extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link">Consumer</a><<a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>></span></div> |
| <div class="block">AMQP Engine interface.</div> |
| </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 void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#accept(org.apache.qpid.protonj2.buffer.ProtonBuffer)" class="member-name-link">accept</a><wbr>(<a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a> input)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"> |
| <div class="block">Provide data input for this Engine from some external source.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="EngineConfiguration.html" title="interface in org.apache.qpid.protonj2.engine">EngineConfiguration</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#configuration()" class="member-name-link">configuration</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Gets the Configuration for this engine.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="Connection.html" title="interface in org.apache.qpid.protonj2.engine">Connection</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#connection()" class="member-name-link">connection</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Gets the <a href="Connection.html" title="interface in org.apache.qpid.protonj2.engine"><code>Connection</code></a> instance that is associated with this <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a> instance.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#engineFailed(java.lang.Throwable)" class="member-name-link">engineFailed</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Throwable.html" title="class or interface in java.lang" class="external-link">Throwable</a> cause)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Transition the <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a> to a failed state if not already closed or closing.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#errorHandler(org.apache.qpid.protonj2.engine.EventHandler)" class="member-name-link">errorHandler</a><wbr>(<a href="EventHandler.html" title="interface in org.apache.qpid.protonj2.engine">EventHandler</a><<a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a>> engineFailure)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Sets a handler instance that will be notified when the engine encounters a fatal error.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Throwable.html" title="class or interface in java.lang" class="external-link">Throwable</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#failureCause()" class="member-name-link">failureCause</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#ingest(org.apache.qpid.protonj2.buffer.ProtonBuffer)" class="member-name-link">ingest</a><wbr>(<a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a> input)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Provide data input for this Engine from some external source.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isFailed()" class="member-name-link">isFailed</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isRunning()" class="member-name-link">isRunning</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isShutdown()" class="member-name-link">isShutdown</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isWritable()" class="member-name-link">isWritable</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns true if the engine is accepting input from the ingestion entry points.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#outputConsumer(java.util.function.Consumer)" class="member-name-link">outputConsumer</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link">Consumer</a><<a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>> consumer)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"> |
| <div class="block">Sets a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link"><code>Consumer</code></a> instance that will be notified when data from the engine is ready to |
| be written to some output sink (socket etc).</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#outputHandler(java.util.function.BiConsumer)" class="member-name-link">outputHandler</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/BiConsumer.html" title="class or interface in java.util.function" class="external-link">BiConsumer</a><<a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Runnable.html" title="class or interface in java.lang" class="external-link">Runnable</a>> output)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Sets a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/BiConsumer.html" title="class or interface in java.util.function" class="external-link"><code>BiConsumer</code></a> instance that will be notified when data from the engine is ready to |
| be written to some output sink (socket etc).</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#outputHandler(org.apache.qpid.protonj2.engine.EventHandler)" class="member-name-link">outputHandler</a><wbr>(<a href="EventHandler.html" title="interface in org.apache.qpid.protonj2.engine">EventHandler</a><<a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>> output)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"> |
| <div class="block">Sets a handler instance that will be notified when data from the engine is ready to |
| be written to some output sink (socket etc).</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="EnginePipeline.html" title="interface in org.apache.qpid.protonj2.engine">EnginePipeline</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#pipeline()" class="member-name-link">pipeline</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Gets the EnginePipeline for this Engine.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="EngineSaslDriver.html" title="interface in org.apache.qpid.protonj2.engine">EngineSaslDriver</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#saslDriver()" class="member-name-link">saslDriver</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Gets the SASL driver for this engine, if no SASL layer is configured then a |
| default no-op driver must be returned that indicates this.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#shutdown()" class="member-name-link">shutdown</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Shutdown the engine preventing any future outbound or inbound processing.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#shutdownHandler(org.apache.qpid.protonj2.engine.EventHandler)" class="member-name-link">shutdownHandler</a><wbr>(<a href="EventHandler.html" title="interface in org.apache.qpid.protonj2.engine">EventHandler</a><<a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a>> engineShutdownEventHandler)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Sets a handler instance that will be notified when the engine is shut down via a call to the |
| <a href="#shutdown()"><code>shutdown()</code></a> method is called.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="Connection.html" title="interface in org.apache.qpid.protonj2.engine">Connection</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#start()" class="member-name-link">start</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Starts the engine and returns the <a href="Connection.html" title="interface in org.apache.qpid.protonj2.engine"><code>Connection</code></a> instance that is bound to this Engine.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="EngineState.html" title="enum in org.apache.qpid.protonj2.engine">EngineState</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#state()" class="member-name-link">state</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>long</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#tick(long)" class="member-name-link">tick</a><wbr>(long currentTime)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Prompt the engine to perform idle-timeout/heartbeat handling, and return an absolute |
| deadline in milliseconds that tick must again be called by/at, based on the provided |
| current time in milliseconds, to ensure the periodic work is carried out as necessary.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#tickAuto(java.util.concurrent.ScheduledExecutorService)" class="member-name-link">tickAuto</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ScheduledExecutorService.html" title="class or interface in java.util.concurrent" class="external-link">ScheduledExecutorService</a> executor)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Allows the engine to manage idle timeout processing by providing it the single threaded executor |
| context where all transport work is done which ensures singled threaded access while removing the |
| need for the client library or server application to manage calls to the <a href="#tick(long)"><code>tick(long)</code></a> methods.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#tickAuto(org.apache.qpid.protonj2.engine.Scheduler)" class="member-name-link">tickAuto</a><wbr>(<a href="Scheduler.html" title="interface in org.apache.qpid.protonj2.engine">Scheduler</a> scheduler)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Allows the engine to manage idle timeout processing by providing it the single threaded executor |
| context where all transport work is done which ensures singled threaded access while removing the |
| need for the client library or server application to manage calls to the <a href="#tick(long)"><code>tick(long)</code></a> methods.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.util.function.Consumer">Methods inherited from interface java.util.function.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link">Consumer</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html#andThen(java.util.function.Consumer)" title="class or interface in java.util.function" class="external-link">andThen</a></code></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="isWritable()"> |
| <h3>isWritable</h3> |
| <div class="member-signature"><span class="return-type">boolean</span> <span class="element-name">isWritable</span>()</div> |
| <div class="block">Returns true if the engine is accepting input from the ingestion entry points. |
| <p> |
| When false any attempts to write more data into the engine will result in an |
| error being returned from the write operation. An engine that has not been |
| started or that has been failed or shutdown will report as not writable.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>true if the engine is current accepting more input.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isRunning()"> |
| <h3>isRunning</h3> |
| <div class="member-signature"><span class="return-type">boolean</span> <span class="element-name">isRunning</span>()</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>true if the Engine has entered the running state and is not failed or shutdown.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isShutdown()"> |
| <h3>isShutdown</h3> |
| <div class="member-signature"><span class="return-type">boolean</span> <span class="element-name">isShutdown</span>()</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>true if the Engine has been shutdown and is no longer usable.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isFailed()"> |
| <h3>isFailed</h3> |
| <div class="member-signature"><span class="return-type">boolean</span> <span class="element-name">isFailed</span>()</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>true if the Engine has encountered a critical error and cannot produce new data.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="failureCause()"> |
| <h3>failureCause</h3> |
| <div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Throwable.html" title="class or interface in java.lang" class="external-link">Throwable</a></span> <span class="element-name">failureCause</span>()</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the error that caused the <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a> fail and shutdown (or null if not failed).</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="state()"> |
| <h3>state</h3> |
| <div class="member-signature"><span class="return-type"><a href="EngineState.html" title="enum in org.apache.qpid.protonj2.engine">EngineState</a></span> <span class="element-name">state</span>()</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the current state of the engine.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="connection()"> |
| <h3>connection</h3> |
| <div class="member-signature"><span class="return-type"><a href="Connection.html" title="interface in org.apache.qpid.protonj2.engine">Connection</a></span> <span class="element-name">connection</span>()</div> |
| <div class="block">Gets the <a href="Connection.html" title="interface in org.apache.qpid.protonj2.engine"><code>Connection</code></a> instance that is associated with this <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a> instance. |
| It is valid for an engine implementation to not return a <a href="Connection.html" title="interface in org.apache.qpid.protonj2.engine"><code>Connection</code></a> instance prior |
| to the engine having been started.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the <a href="Connection.html" title="interface in org.apache.qpid.protonj2.engine"><code>Connection</code></a> that is linked to this engine instance.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="start()"> |
| <h3>start</h3> |
| <div class="member-signature"><span class="return-type"><a href="Connection.html" title="interface in org.apache.qpid.protonj2.engine">Connection</a></span> <span class="element-name">start</span>() |
| throws <span class="exceptions"><a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></span></div> |
| <div class="block">Starts the engine and returns the <a href="Connection.html" title="interface in org.apache.qpid.protonj2.engine"><code>Connection</code></a> instance that is bound to this Engine. |
| |
| A non-started Engine will not allow ingestion of any inbound data and a Connection linked to |
| the engine that was obtained from the <a href="#connection()"><code>connection()</code></a> method cannot produce any |
| outbound data.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the Connection instance that is linked to this <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a></dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></code> - if the Engine state has already transition to shutdown or failed.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="shutdown()"> |
| <h3>shutdown</h3> |
| <div class="member-signature"><span class="return-type"><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></span> <span class="element-name">shutdown</span>()</div> |
| <div class="block">Shutdown the engine preventing any future outbound or inbound processing. |
| |
| When the engine is shut down any resources, <a href="Connection.html" title="interface in org.apache.qpid.protonj2.engine"><code>Connection</code></a>, <a href="Session.html" title="interface in org.apache.qpid.protonj2.engine"><code>Session</code></a> or <a href="Link.html" title="interface in org.apache.qpid.protonj2.engine"><code>Link</code></a> |
| instances that have an engine shutdown event handler registered will be notified and should react |
| by locally closing that resource if they wish to ensure that the resource's local close event |
| handler gets signaled if that resource is not already locally closed.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>this <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="engineFailed(java.lang.Throwable)"> |
| <h3>engineFailed</h3> |
| <div class="member-signature"><span class="return-type"><a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></span> <span class="element-name">engineFailed</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Throwable.html" title="class or interface in java.lang" class="external-link">Throwable</a> cause)</span></div> |
| <div class="block">Transition the <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a> to a failed state if not already closed or closing. |
| |
| If called when the engine has not failed the engine will be transitioned to the failed state |
| and the method will return an appropriate <a href="exceptions/EngineFailedException.html" title="class in org.apache.qpid.protonj2.engine.exceptions"><code>EngineFailedException</code></a> that wraps the given |
| cause. If called after the engine was shutdown the method returns an <a href="exceptions/EngineShutdownException.html" title="class in org.apache.qpid.protonj2.engine.exceptions"><code>EngineShutdownException</code></a> |
| indicating that the engine was already shutdown. Repeated calls to this method while the engine |
| is in the failed state must not alter the original failure error or elicit new engine failed |
| event notifications.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>cause</code> - The exception that caused the engine to be forcibly transitioned to the failed state.</dd> |
| <dt>Returns:</dt> |
| <dd>an <a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions"><code>EngineStateException</code></a> that can be thrown indicating the failure and engine state.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="ingest(org.apache.qpid.protonj2.buffer.ProtonBuffer)"> |
| <h3>ingest</h3> |
| <div class="member-signature"><span class="return-type"><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></span> <span class="element-name">ingest</span><wbr><span class="parameters">(<a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a> input)</span> |
| throws <span class="exceptions"><a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></span></div> |
| <div class="block">Provide data input for this Engine from some external source. If the engine is not writable |
| when this method is called an <a href="exceptions/EngineNotWritableException.html" title="class in org.apache.qpid.protonj2.engine.exceptions"><code>EngineNotWritableException</code></a> will be thrown if unless the |
| reason for the not writable state is due to engine failure or the engine already having been |
| shut down in which case the appropriate <a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions"><code>EngineStateException</code></a> will be thrown to indicate |
| the reason.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>input</code> - The data to feed into to Engine.</dd> |
| <dt>Returns:</dt> |
| <dd>this <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a></dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></code> - if the Engine state precludes accepting new input.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="accept(org.apache.qpid.protonj2.buffer.ProtonBuffer)"> |
| <h3>accept</h3> |
| <div class="member-signature"><span class="modifiers">default</span> <span class="return-type">void</span> <span class="element-name">accept</span><wbr><span class="parameters">(<a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a> input)</span> |
| throws <span class="exceptions"><a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></span></div> |
| <div class="block">Provide data input for this Engine from some external source. If the engine is not writable |
| when this method is called an <a href="exceptions/EngineNotWritableException.html" title="class in org.apache.qpid.protonj2.engine.exceptions"><code>EngineNotWritableException</code></a> will be thrown if unless the |
| reason for the not writable state is due to engine failure or the engine already having been |
| shut down in which case the appropriate <a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions"><code>EngineStateException</code></a> will be thrown to indicate |
| the reason.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html#accept(T)" title="class or interface in java.util.function" class="external-link">accept</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link">Consumer</a><<a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>input</code> - The data to feed into to Engine.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></code> - if the Engine state precludes accepting new input.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="tick(long)"> |
| <h3>tick</h3> |
| <div class="member-signature"><span class="return-type">long</span> <span class="element-name">tick</span><wbr><span class="parameters">(long currentTime)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a>, |
| <a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></span></div> |
| <div class="block">Prompt the engine to perform idle-timeout/heartbeat handling, and return an absolute |
| deadline in milliseconds that tick must again be called by/at, based on the provided |
| current time in milliseconds, to ensure the periodic work is carried out as necessary. |
| It is an error to call this method if the connection has not been opened. |
| |
| A returned deadline of 0 indicates there is no periodic work necessitating tick be called, e.g. |
| because neither peer has defined an idle-timeout value. |
| |
| The provided milliseconds time values should be derived from a monotonic source such as |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/System.html#nanoTime()" title="class or interface in java.lang" class="external-link"><code>System.nanoTime()</code></a> to prevent wall clock changes leading to erroneous behaviour. Note |
| that for <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/System.html#nanoTime()" title="class or interface in java.lang" class="external-link"><code>System.nanoTime()</code></a> derived values in particular that the returned deadline |
| could be a different sign than the originally given value, and so (if non-zero) the returned |
| deadline should have the current time originally provided subtracted from it in order to |
| establish a relative time delay to the next deadline. |
| |
| Supplying <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/System.html#currentTimeMillis()" title="class or interface in java.lang" class="external-link"><code>System.currentTimeMillis()</code></a> derived values can lead to erroneous behaviour |
| during wall clock changes and so is not recommended. |
| |
| It is an error to call this method if <a href="#tickAuto(java.util.concurrent.ScheduledExecutorService)"><code>tickAuto(ScheduledExecutorService)</code></a> was called.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>currentTime</code> - the current time of this tick call.</dd> |
| <dt>Returns:</dt> |
| <dd>the absolute deadline in milliseconds to next call tick by/at, or 0 if there is none.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if the <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a> is already performing auto tick handling.</dd> |
| <dd><code><a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></code> - if the Engine state precludes accepting new input.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="tickAuto(java.util.concurrent.ScheduledExecutorService)"> |
| <h3>tickAuto</h3> |
| <div class="member-signature"><span class="return-type"><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></span> <span class="element-name">tickAuto</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ScheduledExecutorService.html" title="class or interface in java.util.concurrent" class="external-link">ScheduledExecutorService</a> executor)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a>, |
| <a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></span></div> |
| <div class="block">Allows the engine to manage idle timeout processing by providing it the single threaded executor |
| context where all transport work is done which ensures singled threaded access while removing the |
| need for the client library or server application to manage calls to the <a href="#tick(long)"><code>tick(long)</code></a> methods.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>executor</code> - The single threaded execution context where all engine work takes place.</dd> |
| <dt>Returns:</dt> |
| <dd>this <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a></dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if the <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a> is already performing auto tick handling.</dd> |
| <dd><code><a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></code> - if the Engine state precludes accepting new input.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="tickAuto(org.apache.qpid.protonj2.engine.Scheduler)"> |
| <h3>tickAuto</h3> |
| <div class="member-signature"><span class="return-type"><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></span> <span class="element-name">tickAuto</span><wbr><span class="parameters">(<a href="Scheduler.html" title="interface in org.apache.qpid.protonj2.engine">Scheduler</a> scheduler)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a>, |
| <a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></span></div> |
| <div class="block">Allows the engine to manage idle timeout processing by providing it the single threaded executor |
| context where all transport work is done which ensures singled threaded access while removing the |
| need for the client library or server application to manage calls to the <a href="#tick(long)"><code>tick(long)</code></a> methods.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>scheduler</code> - The single threaded execution context where all engine work takes place.</dd> |
| <dt>Returns:</dt> |
| <dd>this <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a></dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if the <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a> is already performing auto tick handling.</dd> |
| <dd><code><a href="exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></code> - if the Engine state precludes accepting new input.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="pipeline()"> |
| <h3>pipeline</h3> |
| <div class="member-signature"><span class="return-type"><a href="EnginePipeline.html" title="interface in org.apache.qpid.protonj2.engine">EnginePipeline</a></span> <span class="element-name">pipeline</span>()</div> |
| <div class="block">Gets the EnginePipeline for this Engine.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the <a href="EnginePipeline.html" title="interface in org.apache.qpid.protonj2.engine"><code>EnginePipeline</code></a> for this <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a>.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="configuration()"> |
| <h3>configuration</h3> |
| <div class="member-signature"><span class="return-type"><a href="EngineConfiguration.html" title="interface in org.apache.qpid.protonj2.engine">EngineConfiguration</a></span> <span class="element-name">configuration</span>()</div> |
| <div class="block">Gets the Configuration for this engine.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the configuration object for this engine.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="saslDriver()"> |
| <h3>saslDriver</h3> |
| <div class="member-signature"><span class="return-type"><a href="EngineSaslDriver.html" title="interface in org.apache.qpid.protonj2.engine">EngineSaslDriver</a></span> <span class="element-name">saslDriver</span>()</div> |
| <div class="block">Gets the SASL driver for this engine, if no SASL layer is configured then a |
| default no-op driver must be returned that indicates this. The SASL driver provides |
| the engine with client and server side SASL handshaking support. An <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a> |
| implementation can support pluggable SASL drivers or exert tight control over the |
| driver as it sees fit. The engine implementation in use will dictate how a SASL |
| driver is assigned or discovered.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the SASL driver for the engine.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="outputHandler(org.apache.qpid.protonj2.engine.EventHandler)"> |
| <h3>outputHandler</h3> |
| <div class="member-signature"><span class="modifiers">default</span> <span class="return-type"><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></span> <span class="element-name">outputHandler</span><wbr><span class="parameters">(<a href="EventHandler.html" title="interface in org.apache.qpid.protonj2.engine">EventHandler</a><<a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>> output)</span></div> |
| <div class="block">Sets a handler instance that will be notified when data from the engine is ready to |
| be written to some output sink (socket etc).</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>output</code> - The <a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBuffer</code></a> handler instance that performs IO for the engine output.</dd> |
| <dt>Returns:</dt> |
| <dd>this <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="outputConsumer(java.util.function.Consumer)"> |
| <h3>outputConsumer</h3> |
| <div class="member-signature"><span class="modifiers">default</span> <span class="return-type"><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></span> <span class="element-name">outputConsumer</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link">Consumer</a><<a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>> consumer)</span></div> |
| <div class="block">Sets a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link"><code>Consumer</code></a> instance that will be notified when data from the engine is ready to |
| be written to some output sink (socket etc).</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>consumer</code> - The <a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBuffer</code></a> consumer instance that performs IO for the engine output.</dd> |
| <dt>Returns:</dt> |
| <dd>this <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="outputHandler(java.util.function.BiConsumer)"> |
| <h3>outputHandler</h3> |
| <div class="member-signature"><span class="return-type"><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></span> <span class="element-name">outputHandler</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/BiConsumer.html" title="class or interface in java.util.function" class="external-link">BiConsumer</a><<a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Runnable.html" title="class or interface in java.lang" class="external-link">Runnable</a>> output)</span></div> |
| <div class="block">Sets a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/BiConsumer.html" title="class or interface in java.util.function" class="external-link"><code>BiConsumer</code></a> instance that will be notified when data from the engine is ready to |
| be written to some output sink (socket etc). The <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Runnable.html" title="class or interface in java.lang" class="external-link"><code>Runnable</code></a> value provided (if non-null) |
| should be invoked once the I/O operation has completely successfully. If the event of an error |
| writing the data the handler should throw an error or if performed asynchronously the <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a> |
| should be marked failed via a call to <a href="#engineFailed(java.lang.Throwable)"><code>engineFailed(Throwable)</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>output</code> - The <a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBuffer</code></a> handler instance that performs IO for the engine output.</dd> |
| <dt>Returns:</dt> |
| <dd>this <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="errorHandler(org.apache.qpid.protonj2.engine.EventHandler)"> |
| <h3>errorHandler</h3> |
| <div class="member-signature"><span class="return-type"><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></span> <span class="element-name">errorHandler</span><wbr><span class="parameters">(<a href="EventHandler.html" title="interface in org.apache.qpid.protonj2.engine">EventHandler</a><<a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a>> engineFailure)</span></div> |
| <div class="block">Sets a handler instance that will be notified when the engine encounters a fatal error.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>engineFailure</code> - The <a href="exceptions/ProtonException.html" title="class in org.apache.qpid.protonj2.engine.exceptions"><code>ProtonException</code></a> handler instance that will be notified if the engine fails.</dd> |
| <dt>Returns:</dt> |
| <dd>this <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="shutdownHandler(org.apache.qpid.protonj2.engine.EventHandler)"> |
| <h3>shutdownHandler</h3> |
| <div class="member-signature"><span class="return-type"><a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></span> <span class="element-name">shutdownHandler</span><wbr><span class="parameters">(<a href="EventHandler.html" title="interface in org.apache.qpid.protonj2.engine">EventHandler</a><<a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a>> engineShutdownEventHandler)</span></div> |
| <div class="block">Sets a handler instance that will be notified when the engine is shut down via a call to the |
| <a href="#shutdown()"><code>shutdown()</code></a> method is called.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>engineShutdownEventHandler</code> - The <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a> instance that was was explicitly shut down.</dd> |
| <dt>Returns:</dt> |
| <dd>this <a href="Engine.html" title="interface in org.apache.qpid.protonj2.engine"><code>Engine</code></a></dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2024 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |