Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-backports > by-pkgid > afb4c294e8f553dc8d6909c852dc1564 > files > 515

java-1.8.0-openjfx-1.8.0.76-1.b04.1.1.mga5.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_77) on Wed Apr 06 14:52:05 UTC 2016 -->
<title>Service (JavaFX 8)</title>
<meta name="date" content="2016-04-06">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="Service (JavaFX 8)";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":6,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":10,"i57":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Service.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">JavaFX&nbsp;8</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../javafx/concurrent/ScheduledService.html" title="class in javafx.concurrent"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../javafx/concurrent/Task.html" title="class in javafx.concurrent"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?javafx/concurrent/Service.html" target="_top">Frames</a></li>
<li><a href="Service.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<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="subNavList">
<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>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">javafx.concurrent</div>
<h2 title="Class Service" class="title">Class Service&lt;V&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>javafx.concurrent.Service&lt;V&gt;</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>V</code> - </dd>
</dl>
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;V&gt;, <a href="../../javafx/event/EventTarget.html" title="interface in javafx.event">EventTarget</a></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../javafx/concurrent/ScheduledService.html" title="class in javafx.concurrent">ScheduledService</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="typeNameLabel">Service&lt;V&gt;</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;V&gt;, <a href="../../javafx/event/EventTarget.html" title="interface in javafx.event">EventTarget</a></pre>
<div class="block"><p>
     A Service is a non-visual component encapsulating the information required
     to perform some work on one or more background threads. As part of the
     JavaFX UI library, the Service knows about the JavaFX Application thread
     and is designed to relieve the application developer from the burden
     of managing multithreaded code that interacts with the user interface. As
     such, all of the methods and state on the Service are intended to be
     invoked exclusively from the JavaFX Application thread. The only exception
     to this, is when initially configuring a Service, which may safely be done
     from any thread, and initially starting a Service, which may also safely
     be done from any thread. However, once the Service has been initialized and
     started, it may only thereafter be used from the FX thread.
 </p>
 <p>
     A Service creates and manages a <a href="../../javafx/concurrent/Task.html" title="class in javafx.concurrent"><code>Task</code></a> that performs the work
     on the background thread.
     Service implements <a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent"><code>Worker</code></a>. As such, you can observe the state of
     the background task and optionally cancel it. Service is a reusable
     Worker, meaning that it can be reset and restarted. Due to this, a Service
     can be constructed declaratively and restarted on demand.
     Once a Service is started, it will schedule its Task and listen for
     changes to the state of the Task. A Task does not hold a reference to the
     Service that started it, meaning that a running Task will not prevent
     the Service from being garbage collected.
 </p>
 <p>
     If an <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent"><code>Executor</code></a> is specified on the Service,
     then it will be used to actually execute the service. Otherwise,
     a daemon thread will be created and executed. If you wish to create
     non-daemon threads, then specify a custom Executor (for example,
     you could use a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadPoolExecutor.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadPoolExecutor</code></a> with a custom
     <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadFactory.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadFactory</code></a>).
 </p>
 <p>
     Because a Service is intended to simplify declarative use cases, subclasses
     should expose as properties the input parameters to the work to be done.
     For example, suppose I wanted to write a Service which read the first line
     from any URL and returned it as a String. Such a Service might be defined,
     such that it had a single property, <code>url</code>. It might be implemented
     as:
     <pre><code>
     public static class FirstLineService extends Service&lt;String&gt; {
         private StringProperty url = new SimpleStringProperty(this, "url");
         public final void setUrl(String value) { url.set(value); }
         public final String getUrl() { return url.get(); }
         public final StringProperty urlProperty() { return url; }

         protected Task createTask() {
             final String _url = getUrl();
             return new Task&ltString&gt;() {
                 protected String call() throws Exception {
                     URL u = new URL(_url);
                     BufferedReader in = new BufferedReader(
                             new InputStreamReader(u.openStream()));
                     String result = in.readLine();
                     in.close();
                     return result;
                 }
             };
         }
     }
     </code></pre>
 </p>
 <p>
     The Service by default uses a thread pool Executor with some unspecified
     default or maximum thread pool size. This is done so that naive code
     will not completely swamp the system by creating thousands of Threads.
 </p></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.0</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== PROPERTY SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="property.summary">
<!--   -->
</a>
<h3>Property Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Property Summary table, listing properties, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Type</th>
<th class="colLast" scope="col">Property and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#exceptionProperty">exception</a></span></code>
<div class="block">Gets the ReadOnlyObjectProperty representing any exception which occurred.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#executorProperty">executor</a></span></code>
<div class="block">The executor to use for running this Service.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyStringProperty.html" title="class in javafx.beans.property">ReadOnlyStringProperty</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#messageProperty">message</a></span></code>
<div class="block">Gets the ReadOnlyStringProperty representing the message.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#onCancelledProperty">onCancelled</a></span></code>
<div class="block">The onCancelled event handler is called whenever the Task state
 transitions to the CANCELLED state.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#onFailedProperty">onFailed</a></span></code>
<div class="block">The onFailed event handler is called whenever the Task state
 transitions to the FAILED state.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#onReadyProperty">onReady</a></span></code>
<div class="block">The onReady event handler is called whenever the Task state transitions
 to the READY state.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#onRunningProperty">onRunning</a></span></code>
<div class="block">The onRunning event handler is called whenever the Task state
 transitions to the RUNNING state.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#onScheduledProperty">onScheduled</a></span></code>
<div class="block">The onSchedule event handler is called whenever the Task state
 transitions to the SCHEDULED state.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#onSucceededProperty">onSucceeded</a></span></code>
<div class="block">The onSucceeded event handler is called whenever the Task state
 transitions to the SUCCEEDED state.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#progressProperty">progress</a></span></code>
<div class="block">Gets the ReadOnlyDoubleProperty representing the progress.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyBooleanProperty.html" title="class in javafx.beans.property">ReadOnlyBooleanProperty</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#runningProperty">running</a></span></code>
<div class="block">Gets the ReadOnlyBooleanProperty representing whether the Worker is running.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../javafx/concurrent/Worker.State.html" title="enum in javafx.concurrent">Worker.State</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#stateProperty">state</a></span></code>
<div class="block">Gets the ReadOnlyObjectProperty representing the current state.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyStringProperty.html" title="class in javafx.beans.property">ReadOnlyStringProperty</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#titleProperty">title</a></span></code>
<div class="block">Gets the ReadOnlyStringProperty representing the title.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#totalWorkProperty">totalWork</a></span></code>
<div class="block">Gets the ReadOnlyDoubleProperty representing the maximum amount of work
 that needs to be done.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#valueProperty">value</a></span></code>
<div class="block">Gets the ReadOnlyObjectProperty representing the value.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#workDoneProperty">workDone</a></span></code>
<div class="block">Gets the ReadOnlyDoubleProperty representing the current progress.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.javafx.concurrent.Worker">
<!--   -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;javafx.concurrent.<a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a></h3>
<code><a href="../../javafx/concurrent/Worker.State.html" title="enum in javafx.concurrent">Worker.State</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#Service--">Service</a></span>()</code>
<div class="block">Create a new Service.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>&lt;T extends <a href="../../javafx/event/Event.html" title="class in javafx.event">Event</a>&gt;<br>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#addEventFilter-javafx.event.EventType-javafx.event.EventHandler-">addEventFilter</a></span>(<a href="../../javafx/event/EventType.html" title="class in javafx.event">EventType</a>&lt;T&gt;&nbsp;eventType,
              <a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;? super T&gt;&nbsp;eventFilter)</code>
<div class="block">Registers an event filter to this task.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>&lt;T extends <a href="../../javafx/event/Event.html" title="class in javafx.event">Event</a>&gt;<br>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#addEventHandler-javafx.event.EventType-javafx.event.EventHandler-">addEventHandler</a></span>(<a href="../../javafx/event/EventType.html" title="class in javafx.event">EventType</a>&lt;T&gt;&nbsp;eventType,
               <a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;? super T&gt;&nbsp;eventHandler)</code>
<div class="block">Registers an event handler to this task.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../javafx/event/EventDispatchChain.html" title="interface in javafx.event">EventDispatchChain</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#buildEventDispatchChain-javafx.event.EventDispatchChain-">buildEventDispatchChain</a></span>(<a href="../../javafx/event/EventDispatchChain.html" title="interface in javafx.event">EventDispatchChain</a>&nbsp;tail)</code>
<div class="block">Construct an event dispatch chain for this target.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#cancel--">cancel</a></span>()</code>
<div class="block">Cancels any currently running Task, if any.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#cancelled--">cancelled</a></span>()</code>
<div class="block">A protected convenience method for subclasses, called whenever the
 state of the Service has transitioned to the CANCELLED state.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected abstract <a href="../../javafx/concurrent/Task.html" title="class in javafx.concurrent">Task</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#createTask--">createTask</a></span>()</code>
<div class="block">Invoked after the Service is started on the JavaFX Application Thread.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#exceptionProperty--">exceptionProperty</a></span>()</code>
<div class="block">Gets the ReadOnlyObjectProperty representing any exception which occurred.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#executeTask-javafx.concurrent.Task-">executeTask</a></span>(<a href="../../javafx/concurrent/Task.html" title="class in javafx.concurrent">Task</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;&nbsp;task)</code>
<div class="block">
     Uses the <code>executor</code> defined on this Service to execute the
     given task.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#executorProperty--">executorProperty</a></span>()</code>
<div class="block">The executor to use for running this Service.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#failed--">failed</a></span>()</code>
<div class="block">A protected convenience method for subclasses, called whenever the
 state of the Service has transitioned to the FAILED state.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#fireEvent-javafx.event.Event-">fireEvent</a></span>(<a href="../../javafx/event/Event.html" title="class in javafx.event">Event</a>&nbsp;event)</code>
<div class="block">Fires the specified event.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getException--">getException</a></span>()</code>
<div class="block">Gets the value of the property exception.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getExecutor--">getExecutor</a></span>()</code>
<div class="block">Gets the value of the property executor.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getMessage--">getMessage</a></span>()</code>
<div class="block">Gets the value of the property message.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getOnCancelled--">getOnCancelled</a></span>()</code>
<div class="block">The onCancelled event handler is called whenever the Task state
 transitions to the CANCELLED state.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getOnFailed--">getOnFailed</a></span>()</code>
<div class="block">The onFailed event handler is called whenever the Task state
 transitions to the FAILED state.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getOnReady--">getOnReady</a></span>()</code>
<div class="block">The onReady event handler is called whenever the Task state transitions
 to the READY state.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getOnRunning--">getOnRunning</a></span>()</code>
<div class="block">The onRunning event handler is called whenever the Task state
 transitions to the RUNNING state.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getOnScheduled--">getOnScheduled</a></span>()</code>
<div class="block">The onSchedule event handler is called whenever the Task state
 transitions to the SCHEDULED state.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getOnSucceeded--">getOnSucceeded</a></span>()</code>
<div class="block">The onSucceeded event handler is called whenever the Task state
 transitions to the SUCCEEDED state.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getProgress--">getProgress</a></span>()</code>
<div class="block">Gets the value of the property progress.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/concurrent/Worker.State.html" title="enum in javafx.concurrent">Worker.State</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getState--">getState</a></span>()</code>
<div class="block">Gets the value of the property state.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getTitle--">getTitle</a></span>()</code>
<div class="block">Gets the value of the property title.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getTotalWork--">getTotalWork</a></span>()</code>
<div class="block">Gets the value of the property totalWork.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code><a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getValue--">getValue</a></span>()</code>
<div class="block">Gets the value of the property value.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#getWorkDone--">getWorkDone</a></span>()</code>
<div class="block">Gets the value of the property workDone.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#isRunning--">isRunning</a></span>()</code>
<div class="block">Gets the value of the property running.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyStringProperty.html" title="class in javafx.beans.property">ReadOnlyStringProperty</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#messageProperty--">messageProperty</a></span>()</code>
<div class="block">Gets the ReadOnlyStringProperty representing the message.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#onCancelledProperty--">onCancelledProperty</a></span>()</code>
<div class="block">The onCancelled event handler is called whenever the Task state
 transitions to the CANCELLED state.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#onFailedProperty--">onFailedProperty</a></span>()</code>
<div class="block">The onFailed event handler is called whenever the Task state
 transitions to the FAILED state.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#onReadyProperty--">onReadyProperty</a></span>()</code>
<div class="block">The onReady event handler is called whenever the Task state transitions
 to the READY state.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#onRunningProperty--">onRunningProperty</a></span>()</code>
<div class="block">The onRunning event handler is called whenever the Task state
 transitions to the RUNNING state.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#onScheduledProperty--">onScheduledProperty</a></span>()</code>
<div class="block">The onSchedule event handler is called whenever the Task state
 transitions to the SCHEDULED state.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#onSucceededProperty--">onSucceededProperty</a></span>()</code>
<div class="block">The onSucceeded event handler is called whenever the Task state
 transitions to the SUCCEEDED state.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#progressProperty--">progressProperty</a></span>()</code>
<div class="block">Gets the ReadOnlyDoubleProperty representing the progress.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#ready--">ready</a></span>()</code>
<div class="block">A protected convenience method for subclasses, called whenever the
 state of the Service has transitioned to the READY state.</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>&lt;T extends <a href="../../javafx/event/Event.html" title="class in javafx.event">Event</a>&gt;<br>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#removeEventFilter-javafx.event.EventType-javafx.event.EventHandler-">removeEventFilter</a></span>(<a href="../../javafx/event/EventType.html" title="class in javafx.event">EventType</a>&lt;T&gt;&nbsp;eventType,
                 <a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;? super T&gt;&nbsp;eventFilter)</code>
<div class="block">Unregisters a previously registered event filter from this task.</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>&lt;T extends <a href="../../javafx/event/Event.html" title="class in javafx.event">Event</a>&gt;<br>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#removeEventHandler-javafx.event.EventType-javafx.event.EventHandler-">removeEventHandler</a></span>(<a href="../../javafx/event/EventType.html" title="class in javafx.event">EventType</a>&lt;T&gt;&nbsp;eventType,
                  <a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;? super T&gt;&nbsp;eventHandler)</code>
<div class="block">Unregisters a previously registered event handler from this task.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#reset--">reset</a></span>()</code>
<div class="block">Resets the Service.</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#restart--">restart</a></span>()</code>
<div class="block">Cancels any currently running Task, if any, and restarts this Service.</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#running--">running</a></span>()</code>
<div class="block">A protected convenience method for subclasses, called whenever the
 state of the Service has transitioned to the RUNNING state.</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyBooleanProperty.html" title="class in javafx.beans.property">ReadOnlyBooleanProperty</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#runningProperty--">runningProperty</a></span>()</code>
<div class="block">Gets the ReadOnlyBooleanProperty representing whether the Worker is running.</div>
</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#scheduled--">scheduled</a></span>()</code>
<div class="block">A protected convenience method for subclasses, called whenever the
 state of the Service has transitioned to the SCHEDULED state.</div>
</td>
</tr>
<tr id="i43" class="rowColor">
<td class="colFirst"><code>protected &lt;T extends <a href="../../javafx/event/Event.html" title="class in javafx.event">Event</a>&gt;<br>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#setEventHandler-javafx.event.EventType-javafx.event.EventHandler-">setEventHandler</a></span>(<a href="../../javafx/event/EventType.html" title="class in javafx.event">EventType</a>&lt;T&gt;&nbsp;eventType,
               <a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;? super T&gt;&nbsp;eventHandler)</code>
<div class="block">Sets the handler to use for this event type.</div>
</td>
</tr>
<tr id="i44" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#setExecutor-java.util.concurrent.Executor-">setExecutor</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a>&nbsp;value)</code>
<div class="block">Sets the value of the property executor.</div>
</td>
</tr>
<tr id="i45" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#setOnCancelled-javafx.event.EventHandler-">setOnCancelled</a></span>(<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;value)</code>
<div class="block">The onCancelled event handler is called whenever the Task state
 transitions to the CANCELLED state.</div>
</td>
</tr>
<tr id="i46" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#setOnFailed-javafx.event.EventHandler-">setOnFailed</a></span>(<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;value)</code>
<div class="block">The onFailed event handler is called whenever the Task state
 transitions to the FAILED state.</div>
</td>
</tr>
<tr id="i47" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#setOnReady-javafx.event.EventHandler-">setOnReady</a></span>(<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;value)</code>
<div class="block">The onReady event handler is called whenever the Task state transitions
 to the READY state.</div>
</td>
</tr>
<tr id="i48" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#setOnRunning-javafx.event.EventHandler-">setOnRunning</a></span>(<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;value)</code>
<div class="block">The onRunning event handler is called whenever the Task state
 transitions to the RUNNING state.</div>
</td>
</tr>
<tr id="i49" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#setOnScheduled-javafx.event.EventHandler-">setOnScheduled</a></span>(<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;value)</code>
<div class="block">The onSchedule event handler is called whenever the Task state
 transitions to the SCHEDULED state.</div>
</td>
</tr>
<tr id="i50" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#setOnSucceeded-javafx.event.EventHandler-">setOnSucceeded</a></span>(<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;value)</code>
<div class="block">The onSucceeded event handler is called whenever the Task state
 transitions to the SUCCEEDED state.</div>
</td>
</tr>
<tr id="i51" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#start--">start</a></span>()</code>
<div class="block">Starts this Service.</div>
</td>
</tr>
<tr id="i52" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../javafx/concurrent/Worker.State.html" title="enum in javafx.concurrent">Worker.State</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#stateProperty--">stateProperty</a></span>()</code>
<div class="block">Gets the ReadOnlyObjectProperty representing the current state.</div>
</td>
</tr>
<tr id="i53" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#succeeded--">succeeded</a></span>()</code>
<div class="block">A protected convenience method for subclasses, called whenever the
 state of the Service has transitioned to the SUCCEEDED state.</div>
</td>
</tr>
<tr id="i54" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyStringProperty.html" title="class in javafx.beans.property">ReadOnlyStringProperty</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#titleProperty--">titleProperty</a></span>()</code>
<div class="block">Gets the ReadOnlyStringProperty representing the title.</div>
</td>
</tr>
<tr id="i55" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#totalWorkProperty--">totalWorkProperty</a></span>()</code>
<div class="block">Gets the ReadOnlyDoubleProperty representing the maximum amount of work
 that needs to be done.</div>
</td>
</tr>
<tr id="i56" class="altColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#valueProperty--">valueProperty</a></span>()</code>
<div class="block">Gets the ReadOnlyObjectProperty representing the value.</div>
</td>
</tr>
<tr id="i57" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/concurrent/Service.html#workDoneProperty--">workDoneProperty</a></span>()</code>
<div class="block">Gets the ReadOnlyDoubleProperty representing the current progress.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ PROPERTY DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="property.detail">
<!--   -->
</a>
<h3>Property Detail</h3>
<a name="stateProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>state</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../javafx/concurrent/Worker.State.html" title="enum in javafx.concurrent">Worker.State</a>&gt; stateProperty</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#stateProperty--">stateProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The property representing the state</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getState--"><code>getState()</code></a></dd>
</dl>
</li>
</ul>
<a name="valueProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>value</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt; valueProperty</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#valueProperty--">valueProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The property representing the current value</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getValue--"><code>getValue()</code></a></dd>
</dl>
</li>
</ul>
<a name="exceptionProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exception</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>&gt; exceptionProperty</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#exceptionProperty--">exceptionProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the property representing the exception</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getException--"><code>getException()</code></a></dd>
</dl>
</li>
</ul>
<a name="workDoneProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>workDone</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a> workDoneProperty</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#workDoneProperty--">workDoneProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The property representing the amount of work done</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getWorkDone--"><code>getWorkDone()</code></a></dd>
</dl>
</li>
</ul>
<a name="totalWorkProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>totalWork</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a> totalWorkProperty</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#totalWorkProperty--">totalWorkProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the property representing the total work to be done</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getTotalWork--"><code>getTotalWork()</code></a></dd>
</dl>
</li>
</ul>
<a name="progressProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>progress</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a> progressProperty</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#progressProperty--">progressProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the property representing the progress</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getProgress--"><code>getProgress()</code></a></dd>
</dl>
</li>
</ul>
<a name="runningProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>running</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyBooleanProperty.html" title="class in javafx.beans.property">ReadOnlyBooleanProperty</a> runningProperty</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#runningProperty--">runningProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the property representing whether the worker is running</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#isRunning--"><code>isRunning()</code></a></dd>
</dl>
</li>
</ul>
<a name="messageProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>message</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyStringProperty.html" title="class in javafx.beans.property">ReadOnlyStringProperty</a> messageProperty</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#messageProperty--">messageProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a property representing the current message</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getMessage--"><code>getMessage()</code></a></dd>
</dl>
</li>
</ul>
<a name="titleProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>title</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyStringProperty.html" title="class in javafx.beans.property">ReadOnlyStringProperty</a> titleProperty</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#titleProperty--">titleProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the property representing the current title</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getTitle--"><code>getTitle()</code></a></dd>
</dl>
</li>
</ul>
<a name="executorProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>executor</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a>&gt; executorProperty</pre>
<div class="block">The executor to use for running this Service. If no executor is specified, then
 a new daemon thread will be created and used for running the Service using some
 default executor.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getExecutor--"><code>getExecutor()</code></a>, 
<a href="../../javafx/concurrent/Service.html#setExecutor-java.util.concurrent.Executor-"><code>setExecutor(Executor)</code></a></dd>
</dl>
</li>
</ul>
<a name="onReadyProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onReady</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt; onReadyProperty</pre>
<div class="block">The onReady event handler is called whenever the Task state transitions
 to the READY state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getOnReady--"><code>getOnReady()</code></a>, 
<a href="../../javafx/concurrent/Service.html#setOnReady-javafx.event.EventHandler-"><code>setOnReady(EventHandler)</code></a></dd>
</dl>
</li>
</ul>
<a name="onScheduledProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onScheduled</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt; onScheduledProperty</pre>
<div class="block">The onSchedule event handler is called whenever the Task state
 transitions to the SCHEDULED state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getOnScheduled--"><code>getOnScheduled()</code></a>, 
<a href="../../javafx/concurrent/Service.html#setOnScheduled-javafx.event.EventHandler-"><code>setOnScheduled(EventHandler)</code></a></dd>
</dl>
</li>
</ul>
<a name="onRunningProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onRunning</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt; onRunningProperty</pre>
<div class="block">The onRunning event handler is called whenever the Task state
 transitions to the RUNNING state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getOnRunning--"><code>getOnRunning()</code></a>, 
<a href="../../javafx/concurrent/Service.html#setOnRunning-javafx.event.EventHandler-"><code>setOnRunning(EventHandler)</code></a></dd>
</dl>
</li>
</ul>
<a name="onSucceededProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onSucceeded</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt; onSucceededProperty</pre>
<div class="block">The onSucceeded event handler is called whenever the Task state
 transitions to the SUCCEEDED state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getOnSucceeded--"><code>getOnSucceeded()</code></a>, 
<a href="../../javafx/concurrent/Service.html#setOnSucceeded-javafx.event.EventHandler-"><code>setOnSucceeded(EventHandler)</code></a></dd>
</dl>
</li>
</ul>
<a name="onCancelledProperty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onCancelled</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt; onCancelledProperty</pre>
<div class="block">The onCancelled event handler is called whenever the Task state
 transitions to the CANCELLED state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getOnCancelled--"><code>getOnCancelled()</code></a>, 
<a href="../../javafx/concurrent/Service.html#setOnCancelled-javafx.event.EventHandler-"><code>setOnCancelled(EventHandler)</code></a></dd>
</dl>
</li>
</ul>
<a name="onFailedProperty">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>onFailed</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt; onFailedProperty</pre>
<div class="block">The onFailed event handler is called whenever the Task state
 transitions to the FAILED state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getOnFailed--"><code>getOnFailed()</code></a>, 
<a href="../../javafx/concurrent/Service.html#setOnFailed-javafx.event.EventHandler-"><code>setOnFailed(EventHandler)</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="Service--">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Service</h4>
<pre>protected&nbsp;Service()</pre>
<div class="block">Create a new Service.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="getState--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getState</h4>
<pre>public final&nbsp;<a href="../../javafx/concurrent/Worker.State.html" title="enum in javafx.concurrent">Worker.State</a>&nbsp;getState()</pre>
<div class="block">Gets the value of the property state.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#getState--">getState</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The current state of this Worker</dd>
</dl>
</li>
</ul>
<a name="stateProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stateProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../javafx/concurrent/Worker.State.html" title="enum in javafx.concurrent">Worker.State</a>&gt;&nbsp;stateProperty()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../javafx/concurrent/Worker.html#stateProperty--">Worker</a></code></span></div>
<div class="block">Gets the ReadOnlyObjectProperty representing the current state.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#stateProperty--">stateProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The property representing the state</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getState--"><code>getState()</code></a></dd>
</dl>
</li>
</ul>
<a name="getValue--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getValue</h4>
<pre>public final&nbsp;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&nbsp;getValue()</pre>
<div class="block">Gets the value of the property value.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#getValue--">getValue</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current value of this Worker</dd>
</dl>
</li>
</ul>
<a name="valueProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>valueProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;&nbsp;valueProperty()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../javafx/concurrent/Worker.html#valueProperty--">Worker</a></code></span></div>
<div class="block">Gets the ReadOnlyObjectProperty representing the value.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#valueProperty--">valueProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The property representing the current value</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getValue--"><code>getValue()</code></a></dd>
</dl>
</li>
</ul>
<a name="getException--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getException</h4>
<pre>public final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>&nbsp;getException()</pre>
<div class="block">Gets the value of the property exception.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#getException--">getException</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the exception, if one occurred</dd>
</dl>
</li>
</ul>
<a name="exceptionProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exceptionProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>&gt;&nbsp;exceptionProperty()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../javafx/concurrent/Worker.html#exceptionProperty--">Worker</a></code></span></div>
<div class="block">Gets the ReadOnlyObjectProperty representing any exception which occurred.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#exceptionProperty--">exceptionProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the property representing the exception</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getException--"><code>getException()</code></a></dd>
</dl>
</li>
</ul>
<a name="getWorkDone--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWorkDone</h4>
<pre>public final&nbsp;double&nbsp;getWorkDone()</pre>
<div class="block">Gets the value of the property workDone.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#getWorkDone--">getWorkDone</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the amount of work done</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Worker.html#totalWorkProperty--"><code>Worker.totalWorkProperty()</code></a>, 
<a href="../../javafx/concurrent/Worker.html#progressProperty--"><code>Worker.progressProperty()</code></a></dd>
</dl>
</li>
</ul>
<a name="workDoneProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>workDoneProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a>&nbsp;workDoneProperty()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../javafx/concurrent/Worker.html#workDoneProperty--">Worker</a></code></span></div>
<div class="block">Gets the ReadOnlyDoubleProperty representing the current progress.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#workDoneProperty--">workDoneProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The property representing the amount of work done</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getWorkDone--"><code>getWorkDone()</code></a></dd>
</dl>
</li>
</ul>
<a name="getTotalWork--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTotalWork</h4>
<pre>public final&nbsp;double&nbsp;getTotalWork()</pre>
<div class="block">Gets the value of the property totalWork.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#getTotalWork--">getTotalWork</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the total work to be done</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Worker.html#workDoneProperty--"><code>Worker.workDoneProperty()</code></a>, 
<a href="../../javafx/concurrent/Worker.html#progressProperty--"><code>Worker.progressProperty()</code></a></dd>
</dl>
</li>
</ul>
<a name="totalWorkProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>totalWorkProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a>&nbsp;totalWorkProperty()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../javafx/concurrent/Worker.html#totalWorkProperty--">Worker</a></code></span></div>
<div class="block">Gets the ReadOnlyDoubleProperty representing the maximum amount of work
 that needs to be done. These "work units" have meaning to the Worker
 implementation, such as the number of bytes that need to be downloaded
 or the number of images to process or some other such metric.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#totalWorkProperty--">totalWorkProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the property representing the total work to be done</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getTotalWork--"><code>getTotalWork()</code></a></dd>
</dl>
</li>
</ul>
<a name="getProgress--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProgress</h4>
<pre>public final&nbsp;double&nbsp;getProgress()</pre>
<div class="block">Gets the value of the property progress.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#getProgress--">getProgress</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current progress</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Worker.html#workDoneProperty--"><code>Worker.workDoneProperty()</code></a>, 
<a href="../../javafx/concurrent/Worker.html#totalWorkProperty--"><code>Worker.totalWorkProperty()</code></a></dd>
</dl>
</li>
</ul>
<a name="progressProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>progressProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a>&nbsp;progressProperty()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../javafx/concurrent/Worker.html#progressProperty--">Worker</a></code></span></div>
<div class="block">Gets the ReadOnlyDoubleProperty representing the progress.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#progressProperty--">progressProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the property representing the progress</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getProgress--"><code>getProgress()</code></a></dd>
</dl>
</li>
</ul>
<a name="isRunning--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRunning</h4>
<pre>public final&nbsp;boolean&nbsp;isRunning()</pre>
<div class="block">Gets the value of the property running.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#isRunning--">isRunning</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this Worker is running</dd>
</dl>
</li>
</ul>
<a name="runningProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>runningProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyBooleanProperty.html" title="class in javafx.beans.property">ReadOnlyBooleanProperty</a>&nbsp;runningProperty()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../javafx/concurrent/Worker.html#runningProperty--">Worker</a></code></span></div>
<div class="block">Gets the ReadOnlyBooleanProperty representing whether the Worker is running.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#runningProperty--">runningProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the property representing whether the worker is running</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#isRunning--"><code>isRunning()</code></a></dd>
</dl>
</li>
</ul>
<a name="getMessage--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMessage</h4>
<pre>public final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getMessage()</pre>
<div class="block">Gets the value of the property message.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#getMessage--">getMessage</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current message</dd>
</dl>
</li>
</ul>
<a name="messageProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>messageProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyStringProperty.html" title="class in javafx.beans.property">ReadOnlyStringProperty</a>&nbsp;messageProperty()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../javafx/concurrent/Worker.html#messageProperty--">Worker</a></code></span></div>
<div class="block">Gets the ReadOnlyStringProperty representing the message.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#messageProperty--">messageProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a property representing the current message</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getMessage--"><code>getMessage()</code></a></dd>
</dl>
</li>
</ul>
<a name="getTitle--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTitle</h4>
<pre>public final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getTitle()</pre>
<div class="block">Gets the value of the property title.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#getTitle--">getTitle</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current title</dd>
</dl>
</li>
</ul>
<a name="titleProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>titleProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ReadOnlyStringProperty.html" title="class in javafx.beans.property">ReadOnlyStringProperty</a>&nbsp;titleProperty()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../javafx/concurrent/Worker.html#titleProperty--">Worker</a></code></span></div>
<div class="block">Gets the ReadOnlyStringProperty representing the title.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#titleProperty--">titleProperty</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the property representing the current title</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getTitle--"><code>getTitle()</code></a></dd>
</dl>
</li>
</ul>
<a name="setExecutor-java.util.concurrent.Executor-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setExecutor</h4>
<pre>public final&nbsp;void&nbsp;setExecutor(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a>&nbsp;value)</pre>
<div class="block">Sets the value of the property executor.</div>
<dl>
<dt><span class="simpleTagLabel">Property description:</span></dt>
<dd>The executor to use for running this Service. If no executor is specified, then
 a new daemon thread will be created and used for running the Service using some
 default executor.</dd>
</dl>
</li>
</ul>
<a name="getExecutor--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExecutor</h4>
<pre>public final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a>&nbsp;getExecutor()</pre>
<div class="block">Gets the value of the property executor.</div>
<dl>
<dt><span class="simpleTagLabel">Property description:</span></dt>
<dd>The executor to use for running this Service. If no executor is specified, then
 a new daemon thread will be created and used for running the Service using some
 default executor.</dd>
</dl>
</li>
</ul>
<a name="executorProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>executorProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a>&gt;&nbsp;executorProperty()</pre>
<div class="block">The executor to use for running this Service. If no executor is specified, then
 a new daemon thread will be created and used for running the Service using some
 default executor.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getExecutor--"><code>getExecutor()</code></a>, 
<a href="../../javafx/concurrent/Service.html#setExecutor-java.util.concurrent.Executor-"><code>setExecutor(Executor)</code></a></dd>
</dl>
</li>
</ul>
<a name="onReadyProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onReadyProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;&nbsp;onReadyProperty()</pre>
<div class="block">The onReady event handler is called whenever the Task state transitions
 to the READY state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getOnReady--"><code>getOnReady()</code></a>, 
<a href="../../javafx/concurrent/Service.html#setOnReady-javafx.event.EventHandler-"><code>setOnReady(EventHandler)</code></a></dd>
</dl>
</li>
</ul>
<a name="getOnReady--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOnReady</h4>
<pre>public final&nbsp;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;getOnReady()</pre>
<div class="block">The onReady event handler is called whenever the Task state transitions
 to the READY state.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the onReady event handler, if any</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="setOnReady-javafx.event.EventHandler-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOnReady</h4>
<pre>public final&nbsp;void&nbsp;setOnReady(<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;value)</pre>
<div class="block">The onReady event handler is called whenever the Task state transitions
 to the READY state.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the event handler, can be null to clear it</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="ready--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ready</h4>
<pre>protected&nbsp;void&nbsp;ready()</pre>
<div class="block">A protected convenience method for subclasses, called whenever the
 state of the Service has transitioned to the READY state.
 This method is invoked after the Service has been fully transitioned to the new state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="onScheduledProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onScheduledProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;&nbsp;onScheduledProperty()</pre>
<div class="block">The onSchedule event handler is called whenever the Task state
 transitions to the SCHEDULED state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getOnScheduled--"><code>getOnScheduled()</code></a>, 
<a href="../../javafx/concurrent/Service.html#setOnScheduled-javafx.event.EventHandler-"><code>setOnScheduled(EventHandler)</code></a></dd>
</dl>
</li>
</ul>
<a name="getOnScheduled--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOnScheduled</h4>
<pre>public final&nbsp;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;getOnScheduled()</pre>
<div class="block">The onSchedule event handler is called whenever the Task state
 transitions to the SCHEDULED state.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the onScheduled event handler, if any</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="setOnScheduled-javafx.event.EventHandler-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOnScheduled</h4>
<pre>public final&nbsp;void&nbsp;setOnScheduled(<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;value)</pre>
<div class="block">The onSchedule event handler is called whenever the Task state
 transitions to the SCHEDULED state.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the event handler, can be null to clear it</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="scheduled--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scheduled</h4>
<pre>protected&nbsp;void&nbsp;scheduled()</pre>
<div class="block">A protected convenience method for subclasses, called whenever the
 state of the Service has transitioned to the SCHEDULED state.
 This method is invoked after the Service has been fully transitioned to the new state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="onRunningProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onRunningProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;&nbsp;onRunningProperty()</pre>
<div class="block">The onRunning event handler is called whenever the Task state
 transitions to the RUNNING state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getOnRunning--"><code>getOnRunning()</code></a>, 
<a href="../../javafx/concurrent/Service.html#setOnRunning-javafx.event.EventHandler-"><code>setOnRunning(EventHandler)</code></a></dd>
</dl>
</li>
</ul>
<a name="getOnRunning--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOnRunning</h4>
<pre>public final&nbsp;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;getOnRunning()</pre>
<div class="block">The onRunning event handler is called whenever the Task state
 transitions to the RUNNING state.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the onRunning event handler, if any</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="setOnRunning-javafx.event.EventHandler-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOnRunning</h4>
<pre>public final&nbsp;void&nbsp;setOnRunning(<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;value)</pre>
<div class="block">The onRunning event handler is called whenever the Task state
 transitions to the RUNNING state.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the event handler, can be null to clear it</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="running--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>running</h4>
<pre>protected&nbsp;void&nbsp;running()</pre>
<div class="block">A protected convenience method for subclasses, called whenever the
 state of the Service has transitioned to the RUNNING state.
 This method is invoked after the Service has been fully transitioned to the new state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="onSucceededProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onSucceededProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;&nbsp;onSucceededProperty()</pre>
<div class="block">The onSucceeded event handler is called whenever the Task state
 transitions to the SUCCEEDED state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getOnSucceeded--"><code>getOnSucceeded()</code></a>, 
<a href="../../javafx/concurrent/Service.html#setOnSucceeded-javafx.event.EventHandler-"><code>setOnSucceeded(EventHandler)</code></a></dd>
</dl>
</li>
</ul>
<a name="getOnSucceeded--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOnSucceeded</h4>
<pre>public final&nbsp;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;getOnSucceeded()</pre>
<div class="block">The onSucceeded event handler is called whenever the Task state
 transitions to the SUCCEEDED state.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the onSucceeded event handler, if any</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="setOnSucceeded-javafx.event.EventHandler-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOnSucceeded</h4>
<pre>public final&nbsp;void&nbsp;setOnSucceeded(<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;value)</pre>
<div class="block">The onSucceeded event handler is called whenever the Task state
 transitions to the SUCCEEDED state.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the event handler, can be null to clear it</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="succeeded--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>succeeded</h4>
<pre>protected&nbsp;void&nbsp;succeeded()</pre>
<div class="block">A protected convenience method for subclasses, called whenever the
 state of the Service has transitioned to the SUCCEEDED state.
 This method is invoked after the Service has been fully transitioned to the new state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="onCancelledProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onCancelledProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;&nbsp;onCancelledProperty()</pre>
<div class="block">The onCancelled event handler is called whenever the Task state
 transitions to the CANCELLED state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getOnCancelled--"><code>getOnCancelled()</code></a>, 
<a href="../../javafx/concurrent/Service.html#setOnCancelled-javafx.event.EventHandler-"><code>setOnCancelled(EventHandler)</code></a></dd>
</dl>
</li>
</ul>
<a name="getOnCancelled--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOnCancelled</h4>
<pre>public final&nbsp;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;getOnCancelled()</pre>
<div class="block">The onCancelled event handler is called whenever the Task state
 transitions to the CANCELLED state.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the onCancelled event handler, if any</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="setOnCancelled-javafx.event.EventHandler-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOnCancelled</h4>
<pre>public final&nbsp;void&nbsp;setOnCancelled(<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;value)</pre>
<div class="block">The onCancelled event handler is called whenever the Task state
 transitions to the CANCELLED state.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the event handler, can be null to clear it</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="cancelled--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cancelled</h4>
<pre>protected&nbsp;void&nbsp;cancelled()</pre>
<div class="block">A protected convenience method for subclasses, called whenever the
 state of the Service has transitioned to the CANCELLED state.
 This method is invoked after the Service has been fully transitioned to the new state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="onFailedProperty--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onFailedProperty</h4>
<pre>public final&nbsp;<a href="../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>&lt;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&gt;&nbsp;onFailedProperty()</pre>
<div class="block">The onFailed event handler is called whenever the Task state
 transitions to the FAILED state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/concurrent/Service.html#getOnFailed--"><code>getOnFailed()</code></a>, 
<a href="../../javafx/concurrent/Service.html#setOnFailed-javafx.event.EventHandler-"><code>setOnFailed(EventHandler)</code></a></dd>
</dl>
</li>
</ul>
<a name="getOnFailed--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOnFailed</h4>
<pre>public final&nbsp;<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;getOnFailed()</pre>
<div class="block">The onFailed event handler is called whenever the Task state
 transitions to the FAILED state.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the onFailed event handler, if any</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="setOnFailed-javafx.event.EventHandler-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOnFailed</h4>
<pre>public final&nbsp;void&nbsp;setOnFailed(<a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;<a href="../../javafx/concurrent/WorkerStateEvent.html" title="class in javafx.concurrent">WorkerStateEvent</a>&gt;&nbsp;value)</pre>
<div class="block">The onFailed event handler is called whenever the Task state
 transitions to the FAILED state.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the event handler, can be null to clear it</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="failed--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>failed</h4>
<pre>protected&nbsp;void&nbsp;failed()</pre>
<div class="block">A protected convenience method for subclasses, called whenever the
 state of the Service has transitioned to the FAILED state.
 This method is invoked after the Service has been fully transitioned to the new state.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="cancel--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cancel</h4>
<pre>public&nbsp;boolean&nbsp;cancel()</pre>
<div class="block">Cancels any currently running Task, if any. The state will be set to CANCELLED.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/concurrent/Worker.html#cancel--">cancel</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/concurrent/Worker.html" title="interface in javafx.concurrent">Worker</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>returns true if the cancel was successful</dd>
</dl>
</li>
</ul>
<a name="restart--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>restart</h4>
<pre>public&nbsp;void&nbsp;restart()</pre>
<div class="block">Cancels any currently running Task, if any, and restarts this Service. The state
 will be reset to READY prior to execution. This method should only be called on
 the FX application thread.</div>
</li>
</ul>
<a name="reset--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre>public&nbsp;void&nbsp;reset()</pre>
<div class="block">Resets the Service. May only be called while in one of the finish states,
 that is, SUCCEEDED, FAILED, or CANCELLED, or when READY. This method should
 only be called on the FX application thread.</div>
</li>
</ul>
<a name="start--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>public&nbsp;void&nbsp;start()</pre>
<div class="block">Starts this Service. The Service must be in the READY state to succeed in this call.
 This method should only be called on the FX application thread.</div>
</li>
</ul>
<a name="executeTask-javafx.concurrent.Task-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>executeTask</h4>
<pre>protected&nbsp;void&nbsp;executeTask(<a href="../../javafx/concurrent/Task.html" title="class in javafx.concurrent">Task</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;&nbsp;task)</pre>
<div class="block"><p>
     Uses the <code>executor</code> defined on this Service to execute the
     given task. If the <code>executor</code> is null, then a default
     executor is used which will create a new daemon thread on which to
     execute this task.
 </p>
 <p>
     This method is intended only to be called by the Service
     implementation.
 </p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>task</code> - a non-null task to execute</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="addEventHandler-javafx.event.EventType-javafx.event.EventHandler-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addEventHandler</h4>
<pre>public final&nbsp;&lt;T extends <a href="../../javafx/event/Event.html" title="class in javafx.event">Event</a>&gt;&nbsp;void&nbsp;addEventHandler(<a href="../../javafx/event/EventType.html" title="class in javafx.event">EventType</a>&lt;T&gt;&nbsp;eventType,
                                                    <a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;? super T&gt;&nbsp;eventHandler)</pre>
<div class="block">Registers an event handler to this task. Any event filters are first
 processed, then the specified onFoo event handlers, and finally any
 event handlers registered by this method. As with other events
 in the scene graph, if an event is consumed, it will not continue
 dispatching.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the specific event class of the handler</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventType</code> - the type of the events to receive by the handler</dd>
<dd><code>eventHandler</code> - the handler to register</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the event type or handler is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="removeEventHandler-javafx.event.EventType-javafx.event.EventHandler-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeEventHandler</h4>
<pre>public final&nbsp;&lt;T extends <a href="../../javafx/event/Event.html" title="class in javafx.event">Event</a>&gt;&nbsp;void&nbsp;removeEventHandler(<a href="../../javafx/event/EventType.html" title="class in javafx.event">EventType</a>&lt;T&gt;&nbsp;eventType,
                                                       <a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;? super T&gt;&nbsp;eventHandler)</pre>
<div class="block">Unregisters a previously registered event handler from this task. One
 handler might have been registered for different event types, so the
 caller needs to specify the particular event type from which to
 unregister the handler.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the specific event class of the handler</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventType</code> - the event type from which to unregister</dd>
<dd><code>eventHandler</code> - the handler to unregister</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the event type or handler is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="addEventFilter-javafx.event.EventType-javafx.event.EventHandler-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addEventFilter</h4>
<pre>public final&nbsp;&lt;T extends <a href="../../javafx/event/Event.html" title="class in javafx.event">Event</a>&gt;&nbsp;void&nbsp;addEventFilter(<a href="../../javafx/event/EventType.html" title="class in javafx.event">EventType</a>&lt;T&gt;&nbsp;eventType,
                                                   <a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;? super T&gt;&nbsp;eventFilter)</pre>
<div class="block">Registers an event filter to this task. Registered event filters get
 an event before any associated event handlers.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the specific event class of the filter</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventType</code> - the type of the events to receive by the filter</dd>
<dd><code>eventFilter</code> - the filter to register</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the event type or filter is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="removeEventFilter-javafx.event.EventType-javafx.event.EventHandler-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeEventFilter</h4>
<pre>public final&nbsp;&lt;T extends <a href="../../javafx/event/Event.html" title="class in javafx.event">Event</a>&gt;&nbsp;void&nbsp;removeEventFilter(<a href="../../javafx/event/EventType.html" title="class in javafx.event">EventType</a>&lt;T&gt;&nbsp;eventType,
                                                      <a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;? super T&gt;&nbsp;eventFilter)</pre>
<div class="block">Unregisters a previously registered event filter from this task. One
 filter might have been registered for different event types, so the
 caller needs to specify the particular event type from which to
 unregister the filter.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the specific event class of the filter</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventType</code> - the event type from which to unregister</dd>
<dd><code>eventFilter</code> - the filter to unregister</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the event type or filter is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="setEventHandler-javafx.event.EventType-javafx.event.EventHandler-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEventHandler</h4>
<pre>protected final&nbsp;&lt;T extends <a href="../../javafx/event/Event.html" title="class in javafx.event">Event</a>&gt;&nbsp;void&nbsp;setEventHandler(<a href="../../javafx/event/EventType.html" title="class in javafx.event">EventType</a>&lt;T&gt;&nbsp;eventType,
                                                       <a href="../../javafx/event/EventHandler.html" title="interface in javafx.event">EventHandler</a>&lt;? super T&gt;&nbsp;eventHandler)</pre>
<div class="block">Sets the handler to use for this event type. There can only be one such
 handler specified at a time. This handler is guaranteed to be called
 first. This is used for registering the user-defined onFoo event
 handlers.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the specific event class of the handler</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventType</code> - the event type to associate with the given eventHandler</dd>
<dd><code>eventHandler</code> - the handler to register, or null to unregister</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the event type is null</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="fireEvent-javafx.event.Event-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fireEvent</h4>
<pre>protected final&nbsp;void&nbsp;fireEvent(<a href="../../javafx/event/Event.html" title="class in javafx.event">Event</a>&nbsp;event)</pre>
<div class="block">Fires the specified event. Any event filter encountered will
 be notified and can consume the event. If not consumed by the filters,
 the event handlers on this task are notified. If these don't consume the
 event either, then all event handlers are called and can consume the
 event.
 <p>
 This method must be called on the FX user thread.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>event</code> - the event to fire</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="buildEventDispatchChain-javafx.event.EventDispatchChain-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildEventDispatchChain</h4>
<pre>public&nbsp;<a href="../../javafx/event/EventDispatchChain.html" title="interface in javafx.event">EventDispatchChain</a>&nbsp;buildEventDispatchChain(<a href="../../javafx/event/EventDispatchChain.html" title="interface in javafx.event">EventDispatchChain</a>&nbsp;tail)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../javafx/event/EventTarget.html#buildEventDispatchChain-javafx.event.EventDispatchChain-">EventTarget</a></code></span></div>
<div class="block">Construct an event dispatch chain for this target. The event dispatch
 chain contains event dispatchers which might be interested in processing
 of events targeted at this <code>EventTarget</code>. This event target is
 not automatically added to the chain, so if it wants to process events,
 it needs to add an <code>EventDispatcher</code> for itself to the chain.
 <p>
 In the case the event target is part of some hierarchy, the chain for it
 is usually built from event dispatchers collected from the root of the
 hierarchy to the event target.
 <p>
 The event dispatch chain is constructed by modifications to the provided
 initial event dispatch chain. The returned chain should have the initial
 chain at its end so the dispatchers should be prepended to the initial
 chain.
 <p>
 The caller shouldn't assume that the initial chain remains unchanged nor
 that the returned value will reference a different chain.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../javafx/event/EventTarget.html#buildEventDispatchChain-javafx.event.EventDispatchChain-">buildEventDispatchChain</a></code>&nbsp;in interface&nbsp;<code><a href="../../javafx/event/EventTarget.html" title="interface in javafx.event">EventTarget</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tail</code> - the initial chain to build from</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resulting event dispatch chain for this target</dd>
</dl>
</li>
</ul>
<a name="createTask--">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>createTask</h4>
<pre>protected abstract&nbsp;<a href="../../javafx/concurrent/Task.html" title="class in javafx.concurrent">Task</a>&lt;<a href="../../javafx/concurrent/Service.html" title="type parameter in Service">V</a>&gt;&nbsp;createTask()</pre>
<div class="block">Invoked after the Service is started on the JavaFX Application Thread.
 Implementations should save off any state into final variables prior to
 creating the Task, since accessing properties defined on the Service
 within the background thread code of the Task will result in exceptions.

 For example:
 <pre><code>
     protected Task createTask() {
         final String url = myService.getUrl();
         return new Task&lt;String&gt;() {
             protected String call() {
                 URL u = new URL("http://www.oracle.com");
                 BufferedReader in = new BufferedReader(
                         new InputStreamReader(u.openStream()));
                 String result = in.readLine();
                 in.close();
                 return result;
             }
         }
     }
 </code></pre>

 <p>
     If the Task is a pre-defined class (as opposed to being an
     anonymous class), and if it followed the recommended best-practice,
     then there is no need to save off state prior to constructing
     the Task since its state is completely provided in its constructor.
 </p>

 <pre><code>
     protected Task createTask() {
         // This is safe because getUrl is called on the FX Application
         // Thread and the FirstLineReaderTasks stores it as an
         // immutable property
         return new FirstLineReaderTask(myService.getUrl());
     }
 </code></pre></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the Task to execute</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Service.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">JavaFX&nbsp;8</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../javafx/concurrent/ScheduledService.html" title="class in javafx.concurrent"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../javafx/concurrent/Task.html" title="class in javafx.concurrent"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?javafx/concurrent/Service.html" target="_top">Frames</a></li>
<li><a href="Service.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<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="subNavList">
<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>
<a name="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><small><a href="https://docs.oracle.com/javase/8/docs/legal/cpyr.html">Copyright</a> (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.</small></small></p>
</body>
</html>