blob: 44b653653401c8e580194f55bdb560c9f936c40f [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>ProtonEngine (Qpid ProtonJ2 Parent 1.0.0-M18 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.impl, class: ProtonEngine">
<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/ProtonEngine.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</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>&nbsp;<a href="package-summary.html">org.apache.qpid.protonj2.engine.impl</a></div>
<h1 title="Class ProtonEngine" class="title">Class ProtonEngine</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">org.apache.qpid.protonj2.engine.impl.ProtonEngine</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</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>&lt;<a href="../../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&gt;</code>, <code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">ProtonEngine</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
implements <a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></span></div>
<div class="block">The default proton Engine implementation.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">ProtonEngine</a>()</code></div>
<div class="col-last even-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ========== 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-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete 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-tab4"><code><a href="ProtonEngineConfiguration.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngineConfiguration</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#configuration()" class="member-name-link">configuration</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the Configuration for this engine.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="ProtonConnection.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonConnection</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#connection()" class="member-name-link">connection</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<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 even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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>&nbsp;cause)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<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 odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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>&lt;<a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a>&gt;&nbsp;handler)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets a handler instance that will be notified when the engine encounters a fatal error.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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 even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#failureCause()" class="member-name-link">failureCause</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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>&nbsp;input)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Provide data input for this Engine from some external source.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isFailed()" class="member-name-link">isFailed</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isRunning()" class="member-name-link">isRunning</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isShutdown()" class="member-name-link">isShutdown</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isWritable()" class="member-name-link">isWritable</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns true if the engine is accepting input from the ingestion entry points.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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>&lt;<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>&gt;&nbsp;handler)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<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-tab4"><code><a href="../EnginePipeline.html" title="interface in org.apache.qpid.protonj2.engine">EnginePipeline</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#pipeline()" class="member-name-link">pipeline</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the EnginePipeline for this Engine.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#registerSaslDriver(org.apache.qpid.protonj2.engine.EngineSaslDriver)" class="member-name-link">registerSaslDriver</a><wbr>(<a href="../EngineSaslDriver.html" title="interface in org.apache.qpid.protonj2.engine">EngineSaslDriver</a>&nbsp;saslDriver)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Allows for registration of a custom <a href="../EngineSaslDriver.html" title="interface in org.apache.qpid.protonj2.engine"><code>EngineSaslDriver</code></a> that will convey
SASL state and configuration for this engine.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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-tab4"><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-tab4">
<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-tab4"><code><a href="ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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-tab4">
<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-tab4"><code><a href="ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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>&lt;<a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a>&gt;&nbsp;handler)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets a handler instance that will be notified when the engine is shut down via a call to the
<a href="../Engine.html#shutdown()"><code>Engine.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-tab4"><code><a href="ProtonConnection.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonConnection</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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-tab4">
<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-tab4"><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-tab4"><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-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>long</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#tick(long)" class="member-name-link">tick</a><wbr>(long&nbsp;currentTime)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<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-tab4"><code><a href="ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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>&nbsp;executor)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<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="../Engine.html#tick(long)"><code>Engine.tick(long)</code></a> methods.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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>&nbsp;executor)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<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="../Engine.html#tick(long)"><code>Engine.tick(long)</code></a> methods.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.util.function.Consumer">Methods inherited from interface&nbsp;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>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.qpid.protonj2.engine.Engine">Methods inherited from interface&nbsp;org.apache.qpid.protonj2.engine.<a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></h3>
<code><a href="../Engine.html#accept(org.apache.qpid.protonj2.buffer.ProtonBuffer)">accept</a>, <a href="../Engine.html#outputConsumer(java.util.function.Consumer)">outputConsumer</a>, <a href="../Engine.html#outputHandler(org.apache.qpid.protonj2.engine.EventHandler)">outputHandler</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>ProtonEngine</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">ProtonEngine</span>()</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="connection()">
<h3>connection</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="ProtonConnection.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonConnection</a></span>&nbsp;<span class="element-name">connection</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#connection()">Engine</a></code></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>Specified by:</dt>
<dd><code><a href="../Engine.html#connection()">connection</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<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="isWritable()">
<h3>isWritable</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isWritable</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#isWritable()">Engine</a></code></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>Specified by:</dt>
<dd><code><a href="../Engine.html#isWritable()">isWritable</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<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="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isRunning</span>()</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Engine.html#isRunning()">isRunning</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<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="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isShutdown</span>()</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Engine.html#isShutdown()">isShutdown</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<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="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isFailed</span>()</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Engine.html#isFailed()">isFailed</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<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="modifiers">public</span>&nbsp;<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>&nbsp;<span class="element-name">failureCause</span>()</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Engine.html#failureCause()">failureCause</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<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="modifiers">public</span>&nbsp;<span class="return-type"><a href="../EngineState.html" title="enum in org.apache.qpid.protonj2.engine">EngineState</a></span>&nbsp;<span class="element-name">state</span>()</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Engine.html#state()">state</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<dt>Returns:</dt>
<dd>the current state of the engine.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="start()">
<h3>start</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="ProtonConnection.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonConnection</a></span>&nbsp;<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"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#start()">Engine</a></code></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="../Engine.html#connection()"><code>Engine.connection()</code></a> method cannot produce any
outbound data.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Engine.html#start()">start</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<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="modifiers">public</span>&nbsp;<span class="return-type"><a href="ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></span>&nbsp;<span class="element-name">shutdown</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#shutdown()">Engine</a></code></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>Specified by:</dt>
<dd><code><a href="../Engine.html#shutdown()">shutdown</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></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="tick(long)">
<h3>tick</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name">tick</span><wbr><span class="parameters">(long&nbsp;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"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#tick(long)">Engine</a></code></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="../Engine.html#tickAuto(java.util.concurrent.ScheduledExecutorService)"><code>Engine.tickAuto(ScheduledExecutorService)</code></a> was called.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Engine.html#tick(long)">tick</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<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="modifiers">public</span>&nbsp;<span class="return-type"><a href="ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></span>&nbsp;<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>&nbsp;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"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#tickAuto(java.util.concurrent.ScheduledExecutorService)">Engine</a></code></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="../Engine.html#tick(long)"><code>Engine.tick(long)</code></a> methods.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Engine.html#tickAuto(java.util.concurrent.ScheduledExecutorService)">tickAuto</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<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="modifiers">public</span>&nbsp;<span class="return-type"><a href="ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></span>&nbsp;<span class="element-name">tickAuto</span><wbr><span class="parameters">(<a href="../Scheduler.html" title="interface in org.apache.qpid.protonj2.engine">Scheduler</a>&nbsp;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"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#tickAuto(org.apache.qpid.protonj2.engine.Scheduler)">Engine</a></code></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="../Engine.html#tick(long)"><code>Engine.tick(long)</code></a> methods.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Engine.html#tickAuto(org.apache.qpid.protonj2.engine.Scheduler)">tickAuto</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<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="ingest(org.apache.qpid.protonj2.buffer.ProtonBuffer)">
<h3>ingest</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></span>&nbsp;<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>&nbsp;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"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#ingest(org.apache.qpid.protonj2.buffer.ProtonBuffer)">Engine</a></code></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="../Engine.html#ingest(org.apache.qpid.protonj2.buffer.ProtonBuffer)">ingest</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<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="engineFailed(java.lang.Throwable)">
<h3>engineFailed</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../exceptions/EngineStateException.html" title="class in org.apache.qpid.protonj2.engine.exceptions">EngineStateException</a></span>&nbsp;<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>&nbsp;cause)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#engineFailed(java.lang.Throwable)">Engine</a></code></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>Specified by:</dt>
<dd><code><a href="../Engine.html#engineFailed(java.lang.Throwable)">engineFailed</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<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="outputHandler(java.util.function.BiConsumer)">
<h3>outputHandler</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></span>&nbsp;<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>&lt;<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>&gt;&nbsp;handler)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#outputHandler(java.util.function.BiConsumer)">Engine</a></code></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="../Engine.html#engineFailed(java.lang.Throwable)"><code>Engine.engineFailed(Throwable)</code></a>.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Engine.html#outputHandler(java.util.function.BiConsumer)">outputHandler</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<dt>Parameters:</dt>
<dd><code>handler</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="modifiers">public</span>&nbsp;<span class="return-type"><a href="ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></span>&nbsp;<span class="element-name">errorHandler</span><wbr><span class="parameters">(<a href="../EventHandler.html" title="interface in org.apache.qpid.protonj2.engine">EventHandler</a>&lt;<a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a>&gt;&nbsp;handler)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#errorHandler(org.apache.qpid.protonj2.engine.EventHandler)">Engine</a></code></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>Specified by:</dt>
<dd><code><a href="../Engine.html#errorHandler(org.apache.qpid.protonj2.engine.EventHandler)">errorHandler</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<dt>Parameters:</dt>
<dd><code>handler</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="modifiers">public</span>&nbsp;<span class="return-type"><a href="ProtonEngine.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngine</a></span>&nbsp;<span class="element-name">shutdownHandler</span><wbr><span class="parameters">(<a href="../EventHandler.html" title="interface in org.apache.qpid.protonj2.engine">EventHandler</a>&lt;<a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a>&gt;&nbsp;handler)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#shutdownHandler(org.apache.qpid.protonj2.engine.EventHandler)">Engine</a></code></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="../Engine.html#shutdown()"><code>Engine.shutdown()</code></a> method is called.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Engine.html#shutdownHandler(org.apache.qpid.protonj2.engine.EventHandler)">shutdownHandler</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<dt>Parameters:</dt>
<dd><code>handler</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>
<li>
<section class="detail" id="pipeline()">
<h3>pipeline</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../EnginePipeline.html" title="interface in org.apache.qpid.protonj2.engine">EnginePipeline</a></span>&nbsp;<span class="element-name">pipeline</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#pipeline()">Engine</a></code></span></div>
<div class="block">Gets the EnginePipeline for this Engine.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Engine.html#pipeline()">pipeline</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<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="modifiers">public</span>&nbsp;<span class="return-type"><a href="ProtonEngineConfiguration.html" title="class in org.apache.qpid.protonj2.engine.impl">ProtonEngineConfiguration</a></span>&nbsp;<span class="element-name">configuration</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#configuration()">Engine</a></code></span></div>
<div class="block">Gets the Configuration for this engine.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Engine.html#configuration()">configuration</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<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="modifiers">public</span>&nbsp;<span class="return-type"><a href="../EngineSaslDriver.html" title="interface in org.apache.qpid.protonj2.engine">EngineSaslDriver</a></span>&nbsp;<span class="element-name">saslDriver</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../Engine.html#saslDriver()">Engine</a></code></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.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../Engine.html#saslDriver()">saslDriver</a></code>&nbsp;in interface&nbsp;<code><a href="../Engine.html" title="interface in org.apache.qpid.protonj2.engine">Engine</a></code></dd>
<dt>Returns:</dt>
<dd>the SASL driver for the engine.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="registerSaslDriver(org.apache.qpid.protonj2.engine.EngineSaslDriver)">
<h3>registerSaslDriver</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">registerSaslDriver</span><wbr><span class="parameters">(<a href="../EngineSaslDriver.html" title="interface in org.apache.qpid.protonj2.engine">EngineSaslDriver</a>&nbsp;saslDriver)</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">Allows for registration of a custom <a href="../EngineSaslDriver.html" title="interface in org.apache.qpid.protonj2.engine"><code>EngineSaslDriver</code></a> that will convey
SASL state and configuration for this engine.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>saslDriver</code> - The <a href="../EngineSaslDriver.html" title="interface in org.apache.qpid.protonj2.engine"><code>EngineSaslDriver</code></a> that this engine will use.</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 doesn't allow for changes</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2023 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>