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.rfxcom.internal.messages;
15 import org.openhab.binding.rfxcom.internal.exceptions.RFXComException;
16 import org.openhab.binding.rfxcom.internal.messages.RFXComBaseMessage.PacketType;
19 * Factory to create RFXCom messages from either bytes delivered by the RFXCom device
20 * or from openhab state to transmit.
22 * @author Pauli Anttila - Initial contribution
23 * @author James Hewitt-Thomas - Convert to interface to allow dependency injection
25 public interface RFXComMessageFactory {
26 public RFXComMessage createMessage(PacketType packetType) throws RFXComException;
28 public RFXComMessage createMessage(byte[] packet) throws RFXComException;