2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.digiplex.internal.communication;
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;
24 * Interface for message handlers.
26 * Visitor pattern is used to dispatch message processing to proper methods.
28 * @author Robert Michalak - Initial contribution
32 public interface DigiplexMessageHandler {
34 default void handleCommunicationStatus(CommunicationStatus response) {
37 default void handleZoneLabelResponse(ZoneLabelResponse response) {
40 default void handleZoneStatusResponse(ZoneStatusResponse response) {
43 default void handleAreaLabelResponse(AreaLabelResponse response) {
46 default void handleAreaStatusResponse(AreaStatusResponse response) {
49 default void handleArmDisarmAreaResponse(AreaArmDisarmResponse response) {
52 default void handleUnknownResponse(UnknownResponse response) {
56 default void handleZoneEvent(ZoneEvent event) {
59 default void handleZoneStatusEvent(ZoneStatusEvent event) {
62 default void handleSpecialAlarmEvent(SpecialAlarmEvent event) {
65 default void handleAreaEvent(AreaEvent event) {
68 default void handleGenericEvent(GenericEvent event) {
71 default void handleTroubleEvent(TroubleEvent troubleEvent) {