Skip to content

Commit

Permalink
[#1081]: add clarifying comment why deleteStrategy is get during runtime
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Fendt <Florian.Fendt@bosch.io>
  • Loading branch information
ffendt committed Jul 1, 2021
1 parent 6a5a52d commit dc907f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ default CompletionStage<ConnectionContext> getConnectionContext(final Connection
* @param connectionId the connection id
* @param dittoHeaders the ditto headers
* @param subscriber the subscriber that will receive {@link org.eclipse.ditto.base.model.signals.events.Event}s
* @return a future that succeeds or fails depends on whether registration was successful.
* @return a future that succeeds or fails depending on whether registration was successful.
*/
CompletionStage<Void> registerForConnectivityConfigChanges(ConnectionId connectionId,
DittoHeaders dittoHeaders, ActorRef subscriber);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ private ReceiveBuilder handleByDeletedStrategyReceiveBuilder() {
final var deletedStrategy = (CommandStrategy<C, S, K, E>) getDeletedStrategy();
return ReceiveBuilder.create()
.match(deletedStrategy.getMatchingClass(), deletedStrategy::isDefined,
// get the current deletedStrategy during "matching time" to allow implementing classes
// to update the strategy during runtime
command -> handleByStrategy(command, (CommandStrategy<C, S, K, E>) getDeletedStrategy()));
}

Expand Down

0 comments on commit dc907f9

Please sign in to comment.