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.paradoxalarm.internal.communication;
15 import org.openhab.binding.paradoxalarm.internal.exceptions.ParadoxRuntimeException;
16 import org.openhab.binding.paradoxalarm.internal.model.PanelType;
17 import org.slf4j.Logger;
18 import org.slf4j.LoggerFactory;
21 * The {@link ParadoxBuilderFactory} used to create the proper communicator builder objects for different panel
24 * @author Konstantin Polihronov - Initial contribution
26 public class ParadoxBuilderFactory {
28 private final Logger logger = LoggerFactory.getLogger(ParadoxBuilderFactory.class);
30 public ICommunicatorBuilder createBuilder(PanelType panelType) {
36 logger.debug("Creating new builder for Paradox {} system", panelType);
37 return new EvoCommunicator.EvoCommunicatorBuilder(panelType);
39 logger.debug("Unsupported panel type: {}", panelType);
40 throw new ParadoxRuntimeException("Unsupported panel type: " + panelType);