Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
made RetrieveConnectionIdsByTag a ConnectivitySudoCommand
* made it possible to overwrite "messages during startup" processing in AbstractPersistenceSupervisor * adjusted ConnectionSupervisorActor to not load config overwrites in preStart(), but in the handleMessagesDuringStartup() instead where the DittoHeaders of the initial command are available * inject DittoHeaders in ConnectionConfigProvider in order to lookup connection config overwrites * enhanced MongoReadJournal by a functionality to retrieve all "tags" of the latest journal entry of a given "pid" Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
- Loading branch information
Showing
15 changed files
with
279 additions
and
83 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
...c/main/java/org/eclipse/ditto/connectivity/api/commands/sudo/ConnectivitySudoCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Copyright (c) 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.ditto.connectivity.api.commands.sudo; | ||
|
||
import org.eclipse.ditto.base.api.commands.sudo.SudoCommand; | ||
import org.eclipse.ditto.base.model.headers.DittoHeaders; | ||
import org.eclipse.ditto.base.model.signals.commands.Command; | ||
|
||
/** | ||
* Aggregates all connectivity sudo commands. | ||
* | ||
* @param <T> the type of the implementing class. | ||
*/ | ||
public interface ConnectivitySudoCommand<T extends ConnectivitySudoCommand<T>> extends SudoCommand<T> { | ||
|
||
/** | ||
* Type Prefix of Sudo commands. | ||
*/ | ||
String TYPE_PREFIX = "connectivity." + SUDO_TYPE_QUALIFIER; | ||
|
||
/** | ||
* Thing sudo resource type. | ||
*/ | ||
String RESOURCE_TYPE = "connectivity-sudo"; | ||
|
||
@Override | ||
default String getResourceType() { | ||
return RESOURCE_TYPE; | ||
} | ||
|
||
@Override | ||
default String getTypePrefix() { | ||
return TYPE_PREFIX; | ||
} | ||
|
||
@Override | ||
T setDittoHeaders(DittoHeaders dittoHeaders); | ||
|
||
/** | ||
* An enumeration of the known {@link org.eclipse.ditto.json.JsonField}s of a Connectivity sudo command. | ||
*/ | ||
class JsonFields extends Command.JsonFields { | ||
|
||
private JsonFields() { | ||
throw new AssertionError(); | ||
} | ||
} | ||
|
||
} |
54 changes: 54 additions & 0 deletions
54
...rg/eclipse/ditto/connectivity/api/commands/sudo/ConnectivitySudoQueryCommandResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Copyright (c) 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.ditto.connectivity.api.commands.sudo; | ||
|
||
import org.eclipse.ditto.base.api.commands.sudo.SudoQueryCommandResponse; | ||
import org.eclipse.ditto.base.model.headers.DittoHeaders; | ||
import org.eclipse.ditto.base.model.signals.commands.CommandResponse; | ||
import org.eclipse.ditto.json.JsonValue; | ||
|
||
/** | ||
* Aggregates all ConnectivitySudoCommand Responses. | ||
* | ||
* @param <T> the type of the implementing class. | ||
*/ | ||
public interface ConnectivitySudoQueryCommandResponse<T extends ConnectivitySudoQueryCommandResponse<T>> extends | ||
SudoQueryCommandResponse<T> { | ||
|
||
/** | ||
* Type Prefix of thing sudo command responses. | ||
*/ | ||
String TYPE_PREFIX = "connectivity." + SUDO_TYPE_QUALIFIER; | ||
|
||
@Override | ||
default String getResourceType() { | ||
return ConnectivitySudoCommand.RESOURCE_TYPE; | ||
} | ||
|
||
@Override | ||
T setEntity(JsonValue entity); | ||
|
||
@Override | ||
T setDittoHeaders(DittoHeaders dittoHeaders); | ||
|
||
/** | ||
* An enumeration of the known {@link org.eclipse.ditto.json.JsonField}s of a Sudo Thing command response. | ||
*/ | ||
class JsonFields extends CommandResponse.JsonFields { | ||
|
||
private JsonFields() { | ||
throw new AssertionError(); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.