Skip to content

Commit

Permalink
Review:
Browse files Browse the repository at this point in the history
removed more deprecated methods;

Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
  • Loading branch information
Stefan Maute committed Apr 19, 2021
1 parent 4a3aa71 commit b1c506b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 140 deletions.
Expand Up @@ -41,26 +41,6 @@ default ThingErrorResponse errorResponse(final DittoRuntimeException dittoRuntim
return ThingErrorResponse.of(dittoRuntimeException);
}

/**
* Creates a generic {@link ErrorResponse} which includes the passed {@link DittoRuntimeException}.
* <p>
* Use this method only if you are absolutely sure that the counterpart which issued the {@link
* org.eclipse.ditto.signals.commands.base.Command} expects such a type of {@code ErrorResponse}
* for the issued {@code Command}.
*
* @param thingId the Thing ID of the related Thing.
* @param dittoRuntimeException the DittoRuntimeException to include in the ErrorResponse.
* @return the built ErrorResponse.
* @throws NullPointerException if {@code dittoRuntimeException} is {@code null}.
* @deprecated Thing ID is now typed.
* Use {@link #errorResponse(org.eclipse.ditto.model.things.ThingId, org.eclipse.ditto.model.base.exceptions.DittoRuntimeException)}
* instead.
*/
@Deprecated
default ThingErrorResponse errorResponse(final String thingId, final DittoRuntimeException dittoRuntimeException) {
return errorResponse(ThingId.of(thingId), dittoRuntimeException);
}

/**
* Creates a generic {@link ErrorResponse} which includes the passed {@link DittoRuntimeException}.
* <p>
Expand Down
Expand Up @@ -13,7 +13,6 @@
package org.eclipse.ditto.client.live.commands.query;

import java.util.List;
import java.util.stream.Collectors;

import javax.annotation.Nonnull;

Expand All @@ -22,7 +21,6 @@
import org.eclipse.ditto.signals.commands.base.WithNamespace;
import org.eclipse.ditto.signals.commands.things.WithSelectedFields;
import org.eclipse.ditto.signals.commands.things.query.RetrieveThings;
import org.eclipse.ditto.signals.commands.things.query.ThingQueryCommand;

/**
* {@link RetrieveThings} live command giving access to the command and all of its special accessors.
Expand All @@ -35,18 +33,6 @@ public interface RetrieveThingsLiveCommand
extends LiveCommand<RetrieveThingsLiveCommand, RetrieveThingsLiveCommandAnswerBuilder>,
WithNamespace, WithSelectedFields {

/**
* Returns the identifiers of the {@code Thing}s to be retrieved.
*
* @return the identifiers
* @deprecated the thing ID is now typed. Use {@link #getEntityIds()} instead.
*/
@Nonnull
@Deprecated
default List<String> getThingIds() {
return getEntityIds().stream().map(String::valueOf).collect(Collectors.toList());
}

@Nonnull
List<ThingId> getEntityIds();

Expand Down
Expand Up @@ -13,24 +13,16 @@
package org.eclipse.ditto.client.messaging;

import java.time.Duration;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.ExecutorService;
import java.util.function.Consumer;

import org.eclipse.ditto.client.configuration.AuthenticationConfiguration;
import org.eclipse.ditto.client.configuration.MessagingConfiguration;
import org.eclipse.ditto.client.internal.bus.AdaptableBus;
import org.eclipse.ditto.client.internal.bus.Classification;
import org.eclipse.ditto.model.messages.Message;
import org.eclipse.ditto.protocoladapter.Adaptable;
import org.eclipse.ditto.protocoladapter.ProtocolFactory;
import org.eclipse.ditto.protocoladapter.TopicPath;
import org.eclipse.ditto.signals.commands.base.Command;
import org.eclipse.ditto.signals.commands.base.CommandResponse;
import org.eclipse.ditto.signals.events.base.Event;

/**
* Interface to be used when implementing a messaging provider for the Things client.
Expand Down Expand Up @@ -139,104 +131,6 @@ default CompletionStage<Adaptable> sendAdaptable(Adaptable adaptable) {
return result;
}

/**
* Send message using the underlying connection.
* Throw {@code UnsupportedOperationException}.
* Protocol-relevant concerns are moved away from messaging providers into API handles.
*
* @param message ignored.
* @param channel ignored.
* @throws UnsupportedOperationException always.
*/
@Deprecated
default void send(Message<?> message, TopicPath.Channel channel) {
throw new UnsupportedOperationException();
}

/**
* Throw {@code UnsupportedOperationException}.
* Protocol-relevant concerns are moved away from messaging providers into API handles.
*
* @param command ignored.
* @param channel ignored.
* @throws UnsupportedOperationException always.
*/
@Deprecated
default void sendCommand(Command<?> command, TopicPath.Channel channel) {
throw new UnsupportedOperationException();
}

/**
* Throw {@code UnsupportedOperationException}.
* Protocol-relevant concerns are moved away from messaging providers into API handles.
*
* @param commandResponse ignored.
* @param channel ignored.
* @throws UnsupportedOperationException always.
*/
@Deprecated
default void sendCommandResponse(CommandResponse<?> commandResponse, TopicPath.Channel channel) {
throw new UnsupportedOperationException();
}

/**
* Throw {@code UnsupportedOperationException}.
* Protocol-relevant concerns are moved away from messaging providers into API handles.
* Use {@code this#emitAdaptable(Adaptable)} or {@code this#emit(String)} instead.
*
* @param event ignored.
* @param channel ignored.
* @throws UnsupportedOperationException always.
*/
@Deprecated
default void emitEvent(Event<?> event, TopicPath.Channel channel) {
throw new UnsupportedOperationException();
}

/**
* Throw {@code UnsupportedOperationException}.
* Protocol-relevant concerns are moved away from messaging providers into API handles.
*
* @param commandResponseHandler ignored.
* @throws UnsupportedOperationException always.
*/
@Deprecated
default void registerReplyHandler(Consumer<CommandResponse<?>> commandResponseHandler) {
throw new UnsupportedOperationException();
}

/**
* Throw {@code UnsupportedOperationException}.
* Protocol-relevant concerns are moved away from messaging providers into API handles.
*
* @param name ignored.
* @param registrationConfig ignored.
* @param handler ignored.
* @param receiptFuture ignored.
* @return nothing.
* @throws UnsupportedOperationException always.
*/
@Deprecated
default boolean registerMessageHandler(String name,
Map<String, String> registrationConfig,
Consumer<Message<?>> handler,
CompletableFuture<Void> receiptFuture) {
throw new UnsupportedOperationException();
}

/**
* Throw {@code UnsupportedOperationException}.
* Protocol-relevant concerns are moved away from messaging providers into API handles.
*
* @param name ignored.
* @param future ignored.
* @throws UnsupportedOperationException always.
*/
@Deprecated
default void deregisterMessageHandler(String name, CompletableFuture<Void> future) {
throw new UnsupportedOperationException();
}

/**
* Close the underlying connection.
*/
Expand Down

0 comments on commit b1c506b

Please sign in to comment.