title: Is there a way of getting the main thread executor for sparkjava / embedded jetty server?
body: <p>I am using SparkJava to make a website. Currently it has an account management system. I have a controller, <code>LoginController</code> that makes a request to the database asynchronously and returns <code>ListenableFuture&lt;Account&gt;</code>.</p>
  
  <p>The account manager call is made inside of a <code>Route</code> in my <code>LoginController</code>, however I want to only redirect the user into the site (sync) once the <code>Account</code> has been grabbed (async).</p>
  
  <p>I know I can do <code>returnedFuture.addListener(runnableThatRedirectsUser, &lt;executor&gt;)</code>, but how can I get the <code>&lt;executor&gt;</code> for the main/sync thread in sparkjava/jetty?</p>
  
  <p>Any help/advice is appreciated! Thanks!</p>