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.gpio.internal.handler;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.core.types.Command;
19 import eu.xeli.jpigpio.JPigpio;
20 import eu.xeli.jpigpio.PigpioException;
23 * The {@link ChannelHandler} provides an interface for different pin
24 * configuration handlers
26 * @author Jan N. Klug - Initial contribution
29 public interface ChannelHandler {
32 * Handles a Command being sent from the
35 void handleCommand(Command command) throws PigpioException;
38 * (Re)Establishes the JPigpio listeners.
40 void listen(@Nullable JPigpio jPigpio) throws PigpioException;
43 * Terminates sending Channels status updates and
44 * shuts down any JPigpio listeners.