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.plugwise.internal;
15 import java.time.LocalDateTime;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.binding.plugwise.internal.protocol.Message;
21 * A queued message that is being sent or waiting to be sent to the Stick.
23 * @author Wouter Born - Initial contribution
26 public class PlugwiseQueuedMessage {
28 private final PlugwiseMessagePriority priority;
29 private final LocalDateTime dateTime = LocalDateTime.now();
30 private final Message message;
33 public PlugwiseQueuedMessage(Message message, PlugwiseMessagePriority priority) {
34 this.message = message;
35 this.priority = priority;
38 public int getAttempts() {
42 public LocalDateTime getDateTime() {
46 public Message getMessage() {
50 public PlugwiseMessagePriority getPriority() {
54 public void increaseAttempts() {