mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-09-20 23:45:59 +00:00
More fixes for proxies
This commit is contained in:
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.databind.node.TextNode;
|
||||
import io.xpipe.beacon.exchange.MessageExchanges;
|
||||
import io.xpipe.beacon.exchange.data.ClientErrorMessage;
|
||||
import io.xpipe.beacon.exchange.data.ServerErrorMessage;
|
||||
import io.xpipe.core.process.ProcessControl;
|
||||
import io.xpipe.core.process.CommandProcessControl;
|
||||
import io.xpipe.core.util.JacksonMapper;
|
||||
import lombok.Builder;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -104,7 +104,7 @@ public class BeaconClient implements AutoCloseable {
|
||||
return client;
|
||||
}
|
||||
|
||||
public static BeaconClient connectGateway(ProcessControl control, GatewayClientInformation information) throws Exception {
|
||||
public static BeaconClient connectGateway(CommandProcessControl control, GatewayClientInformation information) throws Exception {
|
||||
var client = new BeaconClient(() -> {}, control.getStdout(), control.getStdin());
|
||||
client.sendObject(JacksonMapper.newMapper().valueToTree(information));
|
||||
return client;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.xpipe.beacon.exchange;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import io.xpipe.beacon.RequestMessage;
|
||||
import io.xpipe.beacon.ResponseMessage;
|
||||
import lombok.Builder;
|
||||
@@ -7,8 +8,6 @@ import lombok.NonNull;
|
||||
import lombok.Value;
|
||||
import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class NamedFunctionExchange implements MessageExchange {
|
||||
|
||||
@Override
|
||||
@@ -23,7 +22,8 @@ public class NamedFunctionExchange implements MessageExchange {
|
||||
@NonNull
|
||||
String id;
|
||||
|
||||
@NonNull List<Object> arguments;
|
||||
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, property="type")
|
||||
@NonNull Object[] arguments;
|
||||
}
|
||||
|
||||
@Jacksonized
|
||||
|
||||
Reference in New Issue
Block a user