List of usage examples for com.google.common.util.concurrent Service state
State state();
From source file:com.google.litecoin.kits.NewWalletAppKit.java
public Wallet wallet() { checkState(state() == Service.State.STARTING || state() == Service.State.RUNNING, "Cannot call until startup is complete"); return vWallet; }
From source file:com.google.litecoin.kits.NewWalletAppKit.java
public PeerGroup peerGroup() { checkState(state() == Service.State.STARTING || state() == Service.State.RUNNING, "Cannot call until startup is complete"); return vPeerGroup; }
From source file:com.google.litecoin.kits.NewWalletAppKit.java
public PeerGroup peerGroupFull() { checkState(state() == Service.State.STARTING || state() == Service.State.RUNNING, "Cannot call until startup is complete"); return vPeerGroupFull; }
From source file:org.libdohj.cate.controller.MainController.java
/** * Handle a network service failing./*from w w w . ja va 2 s . c o m*/ * * @param network the service which failed. * @param from the status the service was in before it failed. * @param thrwbl the exception causing the service to fail. */ public void onNetworkFailed(Network network, Service.State from, Throwable thrwbl) { networks.remove(network); Platform.runLater(() -> { Alert alert = new Alert(Alert.AlertType.ERROR); alert.setTitle(resources.getString("internalError.title")); alert.setContentText(thrwbl.getMessage()); alert.showAndWait(); }); }