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.atlona.internal.handler;
15 import org.openhab.core.thing.Thing;
16 import org.openhab.core.thing.binding.BaseThingHandler;
19 * This abstract class should be the base class for any Atlona product line handler.
21 * @author Tim Roberts - Initial contribution
23 public abstract class AtlonaHandler<C extends AtlonaCapabilities> extends BaseThingHandler {
26 * The model specific capabilities
28 private final C capabilities;
31 * Constructs the handler from the specified thing and capabilities
33 * @param thing a non-null {@link org.openhab.core.thing.Thing}
34 * @param capabilities a non-null {@link org.openhab.binding.atlona.internal.handler.AtlonaCapabilities}
36 public AtlonaHandler(Thing thing, C capabilities) {
39 if (capabilities == null) {
40 throw new IllegalArgumentException("capabilities cannot be null");
42 this.capabilities = capabilities;
46 * Returns the model specific capabilities
48 * @return a non-null {@link org.openhab.binding.atlona.internal.handler.AtlonaCapabilities}
50 protected C getCapabilities() {