org.eclipse.hono.client.command.CommandConsumer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hono-client-command Show documentation
Show all versions of hono-client-command Show documentation
Clients for Hono's south bound Command and Control API
The newest version!
/*******************************************************************************
* Copyright (c) 2020, 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
package org.eclipse.hono.client.command;
import io.opentracing.SpanContext;
import io.vertx.core.Future;
/**
* A consumer of commands for a specific device.
*
*/
public interface CommandConsumer {
/**
* Closes the consumer.
*
* @param spanContext The span context (may be {@code null}).
* @return A future indicating the outcome of the operation. The future will be failed with a
* {@code org.eclipse.hono.client.ServiceInvocationException} if there was an error closing
* the consumer and with a {@code org.eclipse.hono.client.ClientErrorException} with
* {@link java.net.HttpURLConnection#HTTP_PRECON_FAILED} if the consumer has been
* closed/overwritten already.
*/
Future close(SpanContext spanContext);
}