From c9393e220039c4d896da9d7fae799087fb2725f9 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Portier Date: Tue, 24 Sep 2024 10:26:34 +0200 Subject: [PATCH] refactor (Voice): Remove unused event processing related to 'respond to incoming call' getting started --- .../com/mycompany/app/voice/Controller.java | 9 --------- .../app/voice/ServerBusinessLogic.java | 18 +----------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/getting-started/voice/respond-to-incoming-call/server/src/main/java/com/mycompany/app/voice/Controller.java b/getting-started/voice/respond-to-incoming-call/server/src/main/java/com/mycompany/app/voice/Controller.java index 8150f29..24113fc 100644 --- a/getting-started/voice/respond-to-incoming-call/server/src/main/java/com/mycompany/app/voice/Controller.java +++ b/getting-started/voice/respond-to-incoming-call/server/src/main/java/com/mycompany/app/voice/Controller.java @@ -65,19 +65,10 @@ public ResponseEntity VoiceEvent( var response = switch (event) { case IncomingCallEvent e -> webhooksBusinessLogic.incoming(e); - case AnsweredCallEvent e -> webhooksBusinessLogic.answered(e); case DisconnectCallEvent e -> { webhooksBusinessLogic.disconnect(e); yield null; } - case PromptInputEvent e -> { - webhooksBusinessLogic.prompt(e); - yield null; - } - case NotifyEvent e -> { - webhooksBusinessLogic.notify(e); - yield null; - } default -> throw new IllegalStateException("Unexpected value: " + event); }; diff --git a/getting-started/voice/respond-to-incoming-call/server/src/main/java/com/mycompany/app/voice/ServerBusinessLogic.java b/getting-started/voice/respond-to-incoming-call/server/src/main/java/com/mycompany/app/voice/ServerBusinessLogic.java index e6cc4ca..b9400a3 100644 --- a/getting-started/voice/respond-to-incoming-call/server/src/main/java/com/mycompany/app/voice/ServerBusinessLogic.java +++ b/getting-started/voice/respond-to-incoming-call/server/src/main/java/com/mycompany/app/voice/ServerBusinessLogic.java @@ -31,25 +31,9 @@ public SVAMLControl incoming(IncomingCallEvent event) { .build(); } - public SVAMLControl answered(AnsweredCallEvent event) { - - LOGGER.info("Handle event: " + event); - - return SVAMLControl.builder().build(); - } - public void disconnect(DisconnectCallEvent event) { LOGGER.info("Handle event: " + event); } - - public void prompt(PromptInputEvent event) { - - LOGGER.info("Handle event: " + event); - } - - public void notify(NotifyEvent event) { - - LOGGER.info("Handle event: " + event); - } + }