]> git.basschouten.com Git - openhab-addons.git/blob
c46833ae2fb235b3a4663ca93df210e9f8f5c6c3
[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.dscalarm.internal;
14
15 import java.util.EventObject;
16
17 /**
18  * Event for Receiving API Messages.
19  *
20  * @author Russell Stephens - Initial Contribution
21  */
22 public class DSCAlarmEvent extends EventObject {
23
24     private static final long serialVersionUID = 1L;
25     private DSCAlarmMessage dscAlarmMessage;
26
27     /**
28      * Constructor.
29      *
30      * @param source
31      */
32     public DSCAlarmEvent(Object source) {
33         super(source);
34     }
35
36     /**
37      * Adds the the received API Message to the event.
38      *
39      * @param dscAlarmMessage
40      */
41     public void dscAlarmEventMessage(DSCAlarmMessage dscAlarmMessage) {
42         this.dscAlarmMessage = dscAlarmMessage;
43     }
44
45     /**
46      * Returns the API Message event from the DSC Alarm System.
47      *
48      * @return apiMessage
49      */
50     public DSCAlarmMessage getDSCAlarmMessage() {
51         return dscAlarmMessage;
52     }
53 }