Tty state fixes

This commit is contained in:
crschnick 2024-08-09 07:31:03 +00:00
parent e7f18dc341
commit d750089b52
16 changed files with 28 additions and 1 deletions

View file

@ -28,7 +28,8 @@ public class BeaconRequestHandler<T> implements HttpHandler {
@Override @Override
public void handle(HttpExchange exchange) { public void handle(HttpExchange exchange) {
if (OperationMode.isInShutdown()) { if (OperationMode.isInShutdown() && !beaconInterface.acceptInShutdown()) {
writeError(exchange, new BeaconClientErrorResponse("Daemon is currently in shutdown"), 400);
return; return;
} }

View file

@ -62,6 +62,10 @@ public abstract class BeaconInterface<T> {
return (Class<T>) Class.forName(name); return (Class<T>) Class.forName(name);
} }
public boolean acceptInShutdown() {
return false;
}
public boolean requiresCompletedStartup() { public boolean requiresCompletedStartup() {
return true; return true;
} }

View file

@ -12,6 +12,11 @@ import java.util.UUID;
public class AskpassExchange extends BeaconInterface<AskpassExchange.Request> { public class AskpassExchange extends BeaconInterface<AskpassExchange.Request> {
@Override
public boolean acceptInShutdown() {
return true;
}
@Override @Override
public String getPath() { public String getPath() {
return "/askpass"; return "/askpass";

View file

@ -11,6 +11,11 @@ import lombok.extern.jackson.Jacksonized;
public class HandshakeExchange extends BeaconInterface<HandshakeExchange.Request> { public class HandshakeExchange extends BeaconInterface<HandshakeExchange.Request> {
@Override
public boolean acceptInShutdown() {
return true;
}
@Override @Override
public String getPath() { public String getPath() {
return "/handshake"; return "/handshake";

View file

@ -375,3 +375,4 @@ serialHostDescription=Systemet til at få adgang til den serielle port på
serialPortConfiguration=Konfiguration af seriel port serialPortConfiguration=Konfiguration af seriel port
serialPortConfigurationDescription=Konfigurationsparametre for den tilsluttede serielle enhed serialPortConfigurationDescription=Konfigurationsparametre for den tilsluttede serielle enhed
serialInformation=Seriel information serialInformation=Seriel information
openXShell=Åbn i XShell

View file

@ -353,3 +353,4 @@ serialHostDescription=Das System für den Zugriff auf die serielle Schnittstelle
serialPortConfiguration=Konfiguration der seriellen Schnittstelle serialPortConfiguration=Konfiguration der seriellen Schnittstelle
serialPortConfigurationDescription=Konfigurationsparameter des angeschlossenen seriellen Geräts serialPortConfigurationDescription=Konfigurationsparameter des angeschlossenen seriellen Geräts
serialInformation=Serielle Informationen serialInformation=Serielle Informationen
openXShell=In XShell öffnen

View file

@ -351,3 +351,4 @@ serialHostDescription=The system to access the serial port on
serialPortConfiguration=Serial port configuration serialPortConfiguration=Serial port configuration
serialPortConfigurationDescription=Configuration parameters of the connected serial device serialPortConfigurationDescription=Configuration parameters of the connected serial device
serialInformation=Serial information serialInformation=Serial information
openXShell=Open in XShell

View file

@ -349,3 +349,4 @@ serialHostDescription=El sistema para acceder al puerto serie en
serialPortConfiguration=Configuración del puerto serie serialPortConfiguration=Configuración del puerto serie
serialPortConfigurationDescription=Parámetros de configuración del dispositivo serie conectado serialPortConfigurationDescription=Parámetros de configuración del dispositivo serie conectado
serialInformation=Información en serie serialInformation=Información en serie
openXShell=Abrir en XShell

View file

@ -349,3 +349,4 @@ serialHostDescription=Le système pour accéder au port série sur
serialPortConfiguration=Configuration du port série serialPortConfiguration=Configuration du port série
serialPortConfigurationDescription=Paramètres de configuration de l'appareil en série connecté serialPortConfigurationDescription=Paramètres de configuration de l'appareil en série connecté
serialInformation=Informations en série serialInformation=Informations en série
openXShell=Ouvrir dans XShell

View file

@ -349,3 +349,4 @@ serialHostDescription=Il sistema per accedere alla porta seriale su
serialPortConfiguration=Configurazione della porta seriale serialPortConfiguration=Configurazione della porta seriale
serialPortConfigurationDescription=Parametri di configurazione del dispositivo seriale collegato serialPortConfigurationDescription=Parametri di configurazione del dispositivo seriale collegato
serialInformation=Informazioni di serie serialInformation=Informazioni di serie
openXShell=Apri in XShell

View file

@ -349,3 +349,4 @@ serialHostDescription=のシリアルポートにアクセスするシステム
serialPortConfiguration=シリアルポートの設定 serialPortConfiguration=シリアルポートの設定
serialPortConfigurationDescription=接続されたシリアル・デバイスの設定パラメーター serialPortConfigurationDescription=接続されたシリアル・デバイスの設定パラメーター
serialInformation=シリアル情報 serialInformation=シリアル情報
openXShell=XShellで開く

View file

@ -349,3 +349,4 @@ serialHostDescription=Het systeem om toegang te krijgen tot de seriële poort op
serialPortConfiguration=Seriële poort configuratie serialPortConfiguration=Seriële poort configuratie
serialPortConfigurationDescription=Configuratieparameters van het aangesloten seriële apparaat serialPortConfigurationDescription=Configuratieparameters van het aangesloten seriële apparaat
serialInformation=Seriële informatie serialInformation=Seriële informatie
openXShell=Openen in XShell

View file

@ -349,3 +349,4 @@ serialHostDescription=O sistema para aceder à porta série em
serialPortConfiguration=Configuração da porta de série serialPortConfiguration=Configuração da porta de série
serialPortConfigurationDescription=Parâmetros de configuração do dispositivo de série ligado serialPortConfigurationDescription=Parâmetros de configuração do dispositivo de série ligado
serialInformation=Informação de série serialInformation=Informação de série
openXShell=Abre no XShell

View file

@ -349,3 +349,4 @@ serialHostDescription=Система для доступа к последова
serialPortConfiguration=Конфигурация последовательного порта serialPortConfiguration=Конфигурация последовательного порта
serialPortConfigurationDescription=Параметры конфигурации подключенного последовательного устройства serialPortConfigurationDescription=Параметры конфигурации подключенного последовательного устройства
serialInformation=Серийная информация serialInformation=Серийная информация
openXShell=Открыть в XShell

View file

@ -349,3 +349,4 @@ serialHostDescription=Seri porta erişmek için sistem
serialPortConfiguration=Seri bağlantı noktası yapılandırması serialPortConfiguration=Seri bağlantı noktası yapılandırması
serialPortConfigurationDescription=Bağlı seri cihazın konfigürasyon parametreleri serialPortConfigurationDescription=Bağlı seri cihazın konfigürasyon parametreleri
serialInformation=Seri bilgileri serialInformation=Seri bilgileri
openXShell=XShell'de Aç

View file

@ -349,3 +349,4 @@ serialHostDescription=访问串行端口的系统
serialPortConfiguration=串行端口配置 serialPortConfiguration=串行端口配置
serialPortConfigurationDescription=所连接串行设备的配置参数 serialPortConfigurationDescription=所连接串行设备的配置参数
serialInformation=序列信息 serialInformation=序列信息
openXShell=在 XShell 中打开