mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-26 09:28:26 -04:00
Reformat
This commit is contained in:
@@ -13,8 +13,7 @@ import java.util.Optional;
|
||||
|
||||
public final class XPipeApiConnection extends BeaconConnection {
|
||||
|
||||
private XPipeApiConnection() {
|
||||
}
|
||||
private XPipeApiConnection() {}
|
||||
|
||||
public static XPipeApiConnection open() {
|
||||
var con = new XPipeApiConnection();
|
||||
@@ -32,8 +31,8 @@ public final class XPipeApiConnection extends BeaconConnection {
|
||||
}
|
||||
|
||||
DialogExchange.Response response = con.performSimpleExchange(DialogExchange.Request.builder()
|
||||
.dialogKey(reference.getDialogId())
|
||||
.build());
|
||||
.dialogKey(reference.getDialogId())
|
||||
.build());
|
||||
element = response.getElement();
|
||||
if (response.getElement() == null) {
|
||||
break;
|
||||
@@ -80,9 +79,9 @@ public final class XPipeApiConnection extends BeaconConnection {
|
||||
}
|
||||
|
||||
var s = BeaconClient.tryConnect(BeaconClient.ApiClientInformation.builder()
|
||||
.version("?")
|
||||
.language("Java")
|
||||
.build());
|
||||
.version("?")
|
||||
.language("Java")
|
||||
.build());
|
||||
if (s.isPresent()) {
|
||||
return s;
|
||||
}
|
||||
@@ -124,9 +123,9 @@ public final class XPipeApiConnection extends BeaconConnection {
|
||||
|
||||
try {
|
||||
beaconClient = BeaconClient.connect(BeaconClient.ApiClientInformation.builder()
|
||||
.version("?")
|
||||
.language("Java")
|
||||
.build());
|
||||
.version("?")
|
||||
.language("Java")
|
||||
.build());
|
||||
} catch (Exception ex) {
|
||||
throw new BeaconException("Unable to connect to running xpipe daemon", ex);
|
||||
}
|
||||
|
||||
@@ -10,10 +10,7 @@ import java.io.InputStream;
|
||||
public class DataRawImpl extends DataSourceImpl implements DataRaw {
|
||||
|
||||
public DataRawImpl(
|
||||
DataSourceId sourceId,
|
||||
DataSourceConfig sourceConfig,
|
||||
io.xpipe.core.source.DataSource<?> internalSource
|
||||
) {
|
||||
DataSourceId sourceId, DataSourceConfig sourceConfig, io.xpipe.core.source.DataSource<?> internalSource) {
|
||||
super(sourceId, sourceConfig, internalSource);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,7 @@ public abstract class DataSourceImpl implements DataSource {
|
||||
private final io.xpipe.core.source.DataSource<?> internalSource;
|
||||
|
||||
public DataSourceImpl(
|
||||
DataSourceId sourceId, DataSourceConfig config, io.xpipe.core.source.DataSource<?> internalSource
|
||||
) {
|
||||
DataSourceId sourceId, DataSourceConfig config, io.xpipe.core.source.DataSource<?> internalSource) {
|
||||
this.sourceId = sourceId;
|
||||
this.config = config;
|
||||
this.internalSource = internalSource;
|
||||
|
||||
@@ -9,10 +9,7 @@ import io.xpipe.core.source.DataSourceType;
|
||||
public class DataStructureImpl extends DataSourceImpl implements DataStructure {
|
||||
|
||||
DataStructureImpl(
|
||||
DataSourceId sourceId,
|
||||
DataSourceConfig sourceConfig,
|
||||
io.xpipe.core.source.DataSource<?> internalSource
|
||||
) {
|
||||
DataSourceId sourceId, DataSourceConfig sourceConfig, io.xpipe.core.source.DataSource<?> internalSource) {
|
||||
super(sourceId, sourceConfig, internalSource);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,11 +37,16 @@ public class DataTableAccumulatorImpl implements DataTableAccumulator {
|
||||
connection = XPipeApiConnection.open();
|
||||
|
||||
store = new InternalStreamStore();
|
||||
var addReq = StoreAddExchange.Request.builder().storeInput(store).name(store.getUuid().toString()).build();
|
||||
var addReq = StoreAddExchange.Request.builder()
|
||||
.storeInput(store)
|
||||
.name(store.getUuid().toString())
|
||||
.build();
|
||||
StoreAddExchange.Response addRes = connection.performSimpleExchange(addReq);
|
||||
QuietDialogHandler.handle(addRes.getConfig(), connection);
|
||||
|
||||
connection.sendRequest(WriteStreamExchange.Request.builder().name(store.getUuid().toString()).build());
|
||||
connection.sendRequest(WriteStreamExchange.Request.builder()
|
||||
.name(store.getUuid().toString())
|
||||
.build());
|
||||
bodyOutput = connection.sendBody();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,11 +24,7 @@ import java.util.stream.StreamSupport;
|
||||
|
||||
public class DataTableImpl extends DataSourceImpl implements DataTable {
|
||||
|
||||
DataTableImpl(
|
||||
DataSourceId id,
|
||||
DataSourceConfig sourceConfig,
|
||||
io.xpipe.core.source.DataSource<?> internalSource
|
||||
) {
|
||||
DataTableImpl(DataSourceId id, DataSourceConfig sourceConfig, io.xpipe.core.source.DataSource<?> internalSource) {
|
||||
super(id, sourceConfig, internalSource);
|
||||
}
|
||||
|
||||
@@ -74,7 +70,6 @@ public class DataTableImpl extends DataSourceImpl implements DataTable {
|
||||
public Iterator<TupleNode> iterator() {
|
||||
return new TableIterator();
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
private class TableIterator implements Iterator<TupleNode> {
|
||||
|
||||
@@ -25,10 +25,7 @@ import java.util.stream.StreamSupport;
|
||||
public class DataTextImpl extends DataSourceImpl implements DataText {
|
||||
|
||||
DataTextImpl(
|
||||
DataSourceId sourceId,
|
||||
DataSourceConfig sourceConfig,
|
||||
io.xpipe.core.source.DataSource<?> internalSource
|
||||
) {
|
||||
DataSourceId sourceId, DataSourceConfig sourceConfig, io.xpipe.core.source.DataSource<?> internalSource) {
|
||||
super(sourceId, sourceConfig, internalSource);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user