mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-08-10 19:40:57 +00:00
More polishing
This commit is contained in:
@@ -49,22 +49,6 @@ public abstract class ProcessControlProvider {
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public static ShellControl createSsh(Object sshStore) {
|
||||
return INSTANCES.stream()
|
||||
.map(localProcessControlProvider -> localProcessControlProvider.createSshControl(sshStore))
|
||||
.filter(Objects::nonNull)
|
||||
.findFirst()
|
||||
.orElseThrow();
|
||||
}
|
||||
|
||||
public static String createSshPreview(Object sshStore) {
|
||||
return INSTANCES.stream()
|
||||
.map(localProcessControlProvider -> localProcessControlProvider.createSshControlPreview(sshStore))
|
||||
.filter(Objects::nonNull)
|
||||
.findFirst()
|
||||
.orElseThrow();
|
||||
}
|
||||
|
||||
public abstract ShellControl sub(
|
||||
ShellControl parent,
|
||||
@NonNull FailableFunction<ShellControl, String, Exception> commandFunction,
|
||||
@@ -77,7 +61,4 @@ public abstract class ProcessControlProvider {
|
||||
|
||||
public abstract ShellControl createLocalProcessControl(boolean stoppable);
|
||||
|
||||
public abstract ShellControl createSshControl(Object sshStore);
|
||||
|
||||
public abstract String createSshControlPreview(Object sshStore);
|
||||
}
|
||||
|
||||
@@ -94,8 +94,6 @@ public interface ShellControl extends ProcessControl {
|
||||
|
||||
OsType getOsType();
|
||||
|
||||
boolean checkCanElevate() throws Exception;
|
||||
|
||||
ShellControl elevated(String message, FailableFunction<ShellControl, Boolean, Exception> elevationFunction);
|
||||
|
||||
default ShellControl elevationPassword(SecretValue value) {
|
||||
|
||||
Reference in New Issue
Block a user