public class FetchyEngine extends Object implements org.irenical.lifecycle.LifeCycle
| Constructor and Description |
|---|
FetchyEngine() |
FetchyEngine(ExecutorService executorService) |
| Modifier and Type | Method and Description |
|---|---|
<ERROR extends Exception> |
isRunning() |
String |
onBalance(Consumer<FetchyEvent<Node>> listener) |
<API> String |
onConnect(Consumer<FetchyEvent<API>> listener) |
String |
onDiscover(Consumer<FetchyEvent<List<Node>>> listener) |
String |
onError(Consumer<FetchyEvent<Throwable>> listener) |
String |
onRequest(Consumer<FetchyEvent<?>> listener) |
void |
removeListener(String listenerId) |
<OUTPUT,API,ERROR extends Exception> |
request(ImmutableRequest<OUTPUT,API,ERROR> request) |
<ERROR extends Exception> |
start() |
<ERROR extends Exception> |
stop() |
public FetchyEngine()
public FetchyEngine(ExecutorService executorService)
public <ERROR extends Exception> void start() throws ERROR extends Exception
start in interface org.irenical.lifecycle.LifeCycleERROR extends Exceptionpublic <ERROR extends Exception> void stop() throws ERROR extends Exception
stop in interface org.irenical.lifecycle.LifeCycleERROR extends Exceptionpublic <ERROR extends Exception> boolean isRunning() throws ERROR extends Exception
isRunning in interface org.irenical.lifecycle.LifeCycleERROR extends Exceptionpublic <OUTPUT,API,ERROR extends Exception> OUTPUT request(ImmutableRequest<OUTPUT,API,ERROR> request) throws ERROR extends Exception
ERROR extends Exceptionpublic String onDiscover(Consumer<FetchyEvent<List<Node>>> listener)
public String onBalance(Consumer<FetchyEvent<Node>> listener)
public <API> String onConnect(Consumer<FetchyEvent<API>> listener)
public String onRequest(Consumer<FetchyEvent<?>> listener)
public String onError(Consumer<FetchyEvent<Throwable>> listener)
public void removeListener(String listenerId)
Copyright © 2017 Irenical. All rights reserved.