}
@Override
+ public ModifyPeerCommand useSource() {
+ ignoreSource.set(false);
+ return this;
+ }
+
+ @Override
public Executable<Optional<Peer>> byName(String name) {
nodeIdentifier.set(name);
return this::execute;
}
private ListenableFuture<Optional<Peer>> execute() {
- return threadPool.submit(this::executeSequence);
+ return threadPool.submit(this::executeDialog);
}
- private Optional<Peer> executeSequence() throws IOException, ExecutionException, InterruptedException {
+ private Optional<Peer> executeDialog() throws IOException, ExecutionException, InterruptedException {
ModifyPeer modifyPeer = new ModifyPeer(new RandomIdentifierGenerator().generate(), nodeIdentifier.get());
Optional.ofNullable(enabled.get()).ifPresent(enabled -> modifyPeer.setEnabled(enabled));
Optional.ofNullable(allowLocalAddresses.get()).ifPresent(allowed -> modifyPeer.setAllowLocalAddresses(allowed));