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.nibeuplink.internal.command;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.eclipse.jetty.client.HttpClient;
18 import org.eclipse.jetty.client.api.Response.CompleteListener;
19 import org.eclipse.jetty.client.api.Response.ContentListener;
20 import org.eclipse.jetty.client.api.Response.FailureListener;
21 import org.eclipse.jetty.client.api.Response.SuccessListener;
22 import org.openhab.binding.nibeuplink.internal.connector.StatusUpdateListener;
25 * public interface for all commands
27 * @author Alexander Friese - initial contribution
30 public interface NibeUplinkCommand extends SuccessListener, FailureListener, ContentListener, CompleteListener {
32 public static int MAX_RETRIES = 5;
35 * this method is to be called by the UplinkWebinterface class
37 * @param asyncclient client which will handle the command
39 void performAction(HttpClient asyncclient);
42 * get the current listener
44 * @return instance of the listener, might be null.
47 StatusUpdateListener getListener();
52 * @param listener the listener to be registered.
54 void setListener(StatusUpdateListener listener);