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.easee.internal.command;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jetty.client.HttpClient;
17 import org.eclipse.jetty.client.api.Response.CompleteListener;
18 import org.eclipse.jetty.client.api.Response.ContentListener;
19 import org.eclipse.jetty.client.api.Response.FailureListener;
20 import org.eclipse.jetty.client.api.Response.SuccessListener;
21 import org.openhab.binding.easee.internal.model.ValidationException;
24 * public interface for all commands
26 * @author Alexander Friese - initial contribution
29 public interface EaseeCommand extends SuccessListener, FailureListener, ContentListener, CompleteListener {
31 static final int MAX_RETRIES = 5;
34 * this method is to be called by the UplinkWebinterface class
37 * @throws ValidationException
39 void performAction(HttpClient asyncclient, String token) throws ValidationException;
42 * sets a result processor for json result data
44 * @param resultProcessor
46 public void registerResultProcessor(JsonResultProcessor resultProcessor);