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.lifx.internal;
15 import java.util.concurrent.ScheduledExecutorService;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.binding.lifx.internal.LifxProduct.Features;
19 import org.openhab.binding.lifx.internal.handler.LifxLightHandler;
20 import org.openhab.binding.lifx.internal.handler.LifxLightHandler.CurrentLightState;
23 * The {@link LifxLightContext} shares the context of a light with {@link LifxLightHandler} helper objects.
25 * @author Wouter Born - Initial contribution
28 public class LifxLightContext {
30 private final String logId;
31 private final LifxLightConfig configuration;
32 private final CurrentLightState currentLightState;
33 private final LifxLightState pendingLightState;
34 private final Features features;
35 private final ScheduledExecutorService scheduler;
37 public LifxLightContext(String logId, Features features, LifxLightConfig configuration,
38 CurrentLightState currentLightState, LifxLightState pendingLightState, ScheduledExecutorService scheduler) {
40 this.configuration = configuration;
41 this.features = features;
42 this.currentLightState = currentLightState;
43 this.pendingLightState = pendingLightState;
44 this.scheduler = scheduler;
47 public String getLogId() {
51 public LifxLightConfig getConfiguration() {
55 public Features getFeatures() {
59 public CurrentLightState getCurrentLightState() {
60 return currentLightState;
63 public LifxLightState getPendingLightState() {
64 return pendingLightState;
67 public ScheduledExecutorService getScheduler() {