]> git.basschouten.com Git - openhab-addons.git/blob
5f62342f6b4353c17fb2750b3c0bf334c1e45b75
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.digiplex.internal.communication;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.digiplex.internal.communication.events.AreaEvent;
17 import org.openhab.binding.digiplex.internal.communication.events.GenericEvent;
18 import org.openhab.binding.digiplex.internal.communication.events.SpecialAlarmEvent;
19 import org.openhab.binding.digiplex.internal.communication.events.TroubleEvent;
20 import org.openhab.binding.digiplex.internal.communication.events.ZoneEvent;
21 import org.openhab.binding.digiplex.internal.communication.events.ZoneStatusEvent;
22
23 /**
24  * Interface for message handlers.
25  *
26  * Visitor pattern is used to dispatch message processing to proper methods.
27  *
28  * @author Robert Michalak - Initial contribution
29  *
30  */
31 @NonNullByDefault
32 public interface DigiplexMessageHandler {
33
34     default void handleCommunicationStatus(CommunicationStatus response) {
35     }
36
37     default void handleZoneLabelResponse(ZoneLabelResponse response) {
38     }
39
40     default void handleZoneStatusResponse(ZoneStatusResponse response) {
41     }
42
43     default void handleAreaLabelResponse(AreaLabelResponse response) {
44     }
45
46     default void handleAreaStatusResponse(AreaStatusResponse response) {
47     }
48
49     default void handleArmDisarmAreaResponse(AreaArmDisarmResponse response) {
50     }
51
52     default void handleUnknownResponse(UnknownResponse response) {
53     }
54
55     // Events
56     default void handleZoneEvent(ZoneEvent event) {
57     }
58
59     default void handleZoneStatusEvent(ZoneStatusEvent event) {
60     }
61
62     default void handleSpecialAlarmEvent(SpecialAlarmEvent event) {
63     }
64
65     default void handleAreaEvent(AreaEvent event) {
66     }
67
68     default void handleGenericEvent(GenericEvent event) {
69     }
70
71     default void handleTroubleEvent(TroubleEvent troubleEvent) {
72     }
73 }