-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Calling twin().startConsumption twice for the same channel, will lead…
… to an UncompletedTwinConsumptionRequestException * It is possible to start twin().startConsumption multiple times but not in parallel Signed-off-by: Vadim Guenther <vadim.guenther@bosch.io>
- Loading branch information
Showing
7 changed files
with
113 additions
and
20 deletions.
There are no files selected for viewing
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
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
24 changes: 24 additions & 0 deletions
24
java/src/main/java/org/eclipse/ditto/client/internal/bus/Entry.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,24 @@ | ||
package org.eclipse.ditto.client.internal.bus; | ||
|
||
/** | ||
* Similar to Map.Entry but with object reference identity and fixed key type to act as identifier for | ||
* a subscription. | ||
*/ | ||
final class Entry<T> implements AdaptableBus.SubscriptionId { | ||
|
||
private final Classification key; | ||
private final T value; | ||
|
||
public Entry(final Classification key, final T value) { | ||
this.key = key; | ||
this.value = value; | ||
} | ||
|
||
public Classification getKey() { | ||
return key; | ||
} | ||
|
||
public T getValue() { | ||
return value; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...va/org/eclipse/ditto/client/twin/internal/UncompletedTwinConsumptionRequestException.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,15 @@ | ||
package org.eclipse.ditto.client.twin.internal; | ||
|
||
public class UncompletedTwinConsumptionRequestException extends RuntimeException { | ||
|
||
private static final long serialVersionUID = -565137801315595348L; | ||
private static final String MESSAGE = "First consumption request on this channel must be completed first"; | ||
|
||
/** | ||
* Constructs a new {@code UncompletedTwinConsumptionRequestException} object. | ||
*/ | ||
public UncompletedTwinConsumptionRequestException() { | ||
super(MESSAGE, null); | ||
} | ||
|
||
} |
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