2 * Copyright (c) 2010-2021 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.handler.LifxLightHandler;
19 import org.openhab.binding.lifx.internal.handler.LifxLightHandler.CurrentLightState;
22 * The {@link LifxLightContext} shares the context of a light with {@link LifxLightHandler} helper objects.
24 * @author Wouter Born - Initial contribution
27 public class LifxLightContext {
29 private final String logId;
30 private final LifxLightConfig configuration;
31 private final CurrentLightState currentLightState;
32 private final LifxLightState pendingLightState;
33 private final LifxProduct product;
34 private final ScheduledExecutorService scheduler;
36 public LifxLightContext(String logId, LifxProduct product, LifxLightConfig configuration,
37 CurrentLightState currentLightState, LifxLightState pendingLightState, ScheduledExecutorService scheduler) {
39 this.configuration = configuration;
40 this.product = product;
41 this.currentLightState = currentLightState;
42 this.pendingLightState = pendingLightState;
43 this.scheduler = scheduler;
46 public String getLogId() {
50 public LifxLightConfig getConfiguration() {
54 public LifxProduct getProduct() {
58 public CurrentLightState getCurrentLightState() {
59 return currentLightState;
62 public LifxLightState getPendingLightState() {
63 return pendingLightState;
66 public ScheduledExecutorService getScheduler() {