-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mielecloud] Initial contribution of the Miele Cloud binding #9146
Merged
kaikreuzer
merged 71 commits into
openhab:main
from
BjoernLange:9106-miele-cloud-binding-initial-contribution
May 25, 2021
Merged
Changes from all commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
0a9ed5b
Initial contribution of the Miele Cloud binding
98f90ac
Removed references to Paper UI from README
892ca3f
Move property extraction to own class
07a04d0
Remove plate_is_present channels
e89cf43
Add plateCount property to hob discovery results
0a181a7
Refactorings to improve code quality
e61005d
Fix compile errors in integration tests
fceb1fc
Update thing properties on device status update
364402b
Fix spotless checks
0394f28
Remove accessToken from documentation images
0f36349
plateCount property changes for README
7f0f469
Corrected capitalization in feature.xml
d866dee
Fixed build warnings for README
5c8aeeb
Remove unnecessary @NonNullByDefault annotations
b527daf
Use constructor instead of method injection
72272d9
Lists instead of tables for channel IDs in README
9c8a840
Use UoM for temperatures
b01fdae
Corrected binding name in pom.xml
a546148
Use constructor injection for handler factory
185175c
Catch specific exceptions
d3343af
Adapted logging according to guidelines
e2cd6d4
Replace fixed delay with check of inbox
f30dd1e
Use Set.of
11814dd
Apply review comments in AbstractMieleThingHandler
8111513
Use execute rather than schedule
046772b
No immediate loading of handler factory
546c21a
Use ThingHandlerService for thing discovery
8ebd0a7
Remove obsolete OptionalUtils
82d120e
Remove deprecated author tag
ae14209
Removed obsolete config description
2eb9762
Capitalize and shorten labels
39d26bd
Use required attribute instead of tag
7e54fef
Use Number instead of Number:Time
84b365c
Use Number:Temperature type for temperatures
3ff53fc
Error message for transient HTTP errors
79a4026
Remove minified js and css files
c429eab
Fix some build warnings
c2cd6d1
Remove access token from auto pairing
4ab527d
Fix typo in README
4241bad
Added acknowledgement note to README
1825e14
Use DEBUG/WARN rather than INFO log level
5894439
Additional logging for Retry-After parsing
1b895b5
Limit retry connect interval in all cases
81ff50d
Add test for Retry-After header exceeding maximum SSE reconnect wait …
d5c9d14
Remove outdated information from README
65e80aa
Upgrade to openHAB 3.1.0
b9d1a64
Conditional logging on enabled debug
bd29b93
Use static final Gson
4b54d7e
Nullable annotation as part of the type
16273c3
Consistent use of StringBuilder in ThingsTemplateGenerator
543538e
Include cause exception
f5154e6
Include cause message
687408e
More nullable annotations on types
e9058d6
Fix unit tests broken by logging adaption
dbe2886
Fix logging performance warning
da95ff1
Update integration test run configuration
dde3d3c
Remove logo from README
0254fe5
Remove example thing file in favor of full example
abf4247
Remove outdated note about locale parameter
f9ab516
Remove other ithings file example
e183560
Add table with technical thing types
3ca02d4
Remove warning logs when account is not authorized
46bb587
Things use just OFFLINE if the reason is unclear
ce10358
Remove updateStatus workaround
5198874
handleConfigurationUpdate reinitializes the bridge
594c940
Locale parameter is not required
7389bf9
Add required e-mail address config param
ffcb467
Add device identifier config param
2bd65a6
Do not call framework methods for reinit
9d52296
Add integration test for e-mail address validity
2f3d31b
Update documentation
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Validating CODEOWNERS rules …
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
This content is produced and maintained by the openHAB project. | ||
|
||
* Project home: https://www.openhab.org | ||
|
||
== Declared Project Licenses | ||
|
||
This program and the accompanying materials are made available under the terms | ||
of the Eclipse Public License 2.0 which is available at | ||
https://www.eclipse.org/legal/epl-2.0/. | ||
|
||
== Source Code | ||
|
||
https://github.com/openhab/openhab-addons |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+49.6 KB
bundles/org.openhab.binding.mielecloud/doc/account-overview-empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+84.9 KB
bundles/org.openhab.binding.mielecloud/doc/account-overview-with-bridge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.openhab.addons.bundles</groupId> | ||
<artifactId>org.openhab.addons.reactor.bundles</artifactId> | ||
<version>3.1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>org.openhab.binding.mielecloud</artifactId> | ||
|
||
<name>openHAB Add-ons :: Bundles :: Miele Cloud Binding</name> | ||
|
||
</project> |
23 changes: 23 additions & 0 deletions
23
bundles/org.openhab.binding.mielecloud/src/main/feature/feature.xml
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,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
|
||
Copyright (c) 2010-2020 Contributors to the openHAB project | ||
|
||
See the NOTICE file(s) distributed with this work for additional | ||
information. | ||
|
||
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 | ||
|
||
--> | ||
<features name="org.openhab.binding.mielecloud-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"> | ||
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository> | ||
|
||
<feature name="openhab-binding-mielecloud" description="Miele Cloud Binding" version="${project.version}"> | ||
<feature>openhab-runtime-base</feature> | ||
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.mielecloud/${project.version}</bundle> | ||
</feature> | ||
</features> |
238 changes: 238 additions & 0 deletions
238
...oud/src/main/java/org/openhab/binding/mielecloud/internal/MieleCloudBindingConstants.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,238 @@ | ||
/** | ||
* Copyright (c) 2010-2021 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* 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.openhab.binding.mielecloud.internal; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
import org.openhab.core.thing.ThingTypeUID; | ||
|
||
/** | ||
* The {@link MieleCloudBindingConstants} class defines common constants, which are | ||
* used across the whole binding. | ||
* | ||
* @author Roland Edelhoff - Initial contribution | ||
* @author Björn Lange - Added locale config parameter, added i18n key collection | ||
* @author Benjamin Bolte - Add pre-heat finished and plate step channels, door state and door alarm channels, info | ||
* state channel and map signal flags from API | ||
* @author Björn Lange - Add elapsed time channel, dish warmer thing | ||
*/ | ||
@NonNullByDefault | ||
public final class MieleCloudBindingConstants { | ||
|
||
private MieleCloudBindingConstants() { | ||
} | ||
|
||
/** | ||
* ID of the binding. | ||
*/ | ||
public static final String BINDING_ID = "mielecloud"; | ||
|
||
/** | ||
* Thing type ID of Miele cloud bridges / accounts. | ||
*/ | ||
public static final String BRIDGE_TYPE_ID = "account"; | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele cloud bridges / accounts. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_BRIDGE = new ThingTypeUID(BINDING_ID, BRIDGE_TYPE_ID); | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele washing machines. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_WASHING_MACHINE = new ThingTypeUID(BINDING_ID, "washing_machine"); | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele washer-dryers. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_WASHER_DRYER = new ThingTypeUID(BINDING_ID, "washer_dryer"); | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele coffee machines. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_COFFEE_SYSTEM = new ThingTypeUID(BINDING_ID, "coffee_system"); | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele fridge-freezers. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_FRIDGE_FREEZER = new ThingTypeUID(BINDING_ID, "fridge_freezer"); | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele fridges. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_FRIDGE = new ThingTypeUID(BINDING_ID, "fridge"); | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele freezers. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_FREEZER = new ThingTypeUID(BINDING_ID, "freezer"); | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele ovens. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_OVEN = new ThingTypeUID(BINDING_ID, "oven"); | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele hobs. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_HOB = new ThingTypeUID(BINDING_ID, "hob"); | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele wine storages. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_WINE_STORAGE = new ThingTypeUID(BINDING_ID, "wine_storage"); | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele dishwashers. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_DISHWASHER = new ThingTypeUID(BINDING_ID, "dishwasher"); | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele dryers. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_DRYER = new ThingTypeUID(BINDING_ID, "dryer"); | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele hoods. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_HOOD = new ThingTypeUID(BINDING_ID, "hood"); | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele dish warmers. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_DISH_WARMER = new ThingTypeUID(BINDING_ID, "dish_warmer"); | ||
|
||
/** | ||
* The {@link ThingTypeUID} of Miele robotic vacuum cleaners. | ||
*/ | ||
public static final ThingTypeUID THING_TYPE_ROBOTIC_VACUUM_CLEANER = new ThingTypeUID(BINDING_ID, | ||
"robotic_vacuum_cleaner"); | ||
|
||
/** | ||
* Name of the property storing the OAuth2 access token. | ||
*/ | ||
public static final String PROPERTY_ACCESS_TOKEN = "accessToken"; | ||
|
||
/** | ||
* Name of the configuration parameter for the e-mail address. | ||
*/ | ||
public static final String CONFIG_PARAM_EMAIL = "email"; | ||
|
||
/** | ||
* Name of the configuration parameter for the device identifier uniquely identifying a Miele device. | ||
*/ | ||
public static final String CONFIG_PARAM_DEVICE_IDENTIFIER = "deviceIdentifier"; | ||
|
||
/** | ||
* Name of the configuration parameter for the locale. The locale is stored as a 2-letter language code. | ||
*/ | ||
public static final String CONFIG_PARAM_LOCALE = "locale"; | ||
|
||
/** | ||
* Name of the property storing the number of plates for hobs. | ||
*/ | ||
public static final String PROPERTY_PLATE_COUNT = "plateCount"; | ||
|
||
/** | ||
* Constants for all channels. | ||
*/ | ||
public static final class Channels { | ||
private Channels() { | ||
} | ||
|
||
public static final String REMOTE_CONTROL_CAN_BE_STARTED = "remote_control_can_be_started"; | ||
public static final String REMOTE_CONTROL_CAN_BE_STOPPED = "remote_control_can_be_stopped"; | ||
public static final String REMOTE_CONTROL_CAN_BE_PAUSED = "remote_control_can_be_paused"; | ||
public static final String REMOTE_CONTROL_CAN_BE_SWITCHED_ON = "remote_control_can_be_switched_on"; | ||
public static final String REMOTE_CONTROL_CAN_BE_SWITCHED_OFF = "remote_control_can_be_switched_off"; | ||
public static final String REMOTE_CONTROL_CAN_SET_PROGRAM_ACTIVE = "remote_control_can_set_program_active"; | ||
public static final String SPINNING_SPEED = "spinning_speed"; | ||
public static final String SPINNING_SPEED_RAW = "spinning_speed_raw"; | ||
public static final String PROGRAM_ACTIVE = "program_active"; | ||
public static final String PROGRAM_ACTIVE_RAW = "program_active_raw"; | ||
public static final String DISH_WARMER_PROGRAM_ACTIVE = "dish_warmer_program_active"; | ||
public static final String VACUUM_CLEANER_PROGRAM_ACTIVE = "vacuum_cleaner_program_active"; | ||
public static final String PROGRAM_PHASE = "program_phase"; | ||
public static final String PROGRAM_PHASE_RAW = "program_phase_raw"; | ||
public static final String OPERATION_STATE = "operation_state"; | ||
public static final String OPERATION_STATE_RAW = "operation_state_raw"; | ||
public static final String PROGRAM_START_STOP = "program_start_stop"; | ||
public static final String PROGRAM_START_STOP_PAUSE = "program_start_stop_pause"; | ||
public static final String POWER_ON_OFF = "power_state_on_off"; | ||
public static final String FINISH_STATE = "finish_state"; | ||
public static final String DELAYED_START_TIME = "delayed_start_time"; | ||
public static final String PROGRAM_REMAINING_TIME = "program_remaining_time"; | ||
public static final String PROGRAM_ELAPSED_TIME = "program_elapsed_time"; | ||
public static final String PROGRAM_PROGRESS = "program_progress"; | ||
public static final String DRYING_TARGET = "drying_target"; | ||
public static final String DRYING_TARGET_RAW = "drying_target_raw"; | ||
public static final String PRE_HEAT_FINISHED = "pre_heat_finished"; | ||
public static final String TEMPERATURE_TARGET = "temperature_target"; | ||
public static final String TEMPERATURE_CURRENT = "temperature_current"; | ||
public static final String TEMPERATURE_CORE_TARGET = "temperature_core_target"; | ||
public static final String TEMPERATURE_CORE_CURRENT = "temperature_core_current"; | ||
public static final String VENTILATION_POWER = "ventilation_power"; | ||
public static final String VENTILATION_POWER_RAW = "ventilation_power_raw"; | ||
public static final String ERROR_STATE = "error_state"; | ||
public static final String INFO_STATE = "info_state"; | ||
public static final String FRIDGE_SUPER_COOL = "fridge_super_cool"; | ||
public static final String FREEZER_SUPER_FREEZE = "freezer_super_freeze"; | ||
public static final String SUPER_COOL_CAN_BE_CONTROLLED = "super_cool_can_be_controlled"; | ||
public static final String SUPER_FREEZE_CAN_BE_CONTROLLED = "super_freeze_can_be_controlled"; | ||
public static final String FRIDGE_TEMPERATURE_TARGET = "fridge_temperature_target"; | ||
public static final String FRIDGE_TEMPERATURE_CURRENT = "fridge_temperature_current"; | ||
public static final String FREEZER_TEMPERATURE_TARGET = "freezer_temperature_target"; | ||
public static final String FREEZER_TEMPERATURE_CURRENT = "freezer_temperature_current"; | ||
public static final String TOP_TEMPERATURE_TARGET = "top_temperature_target"; | ||
public static final String TOP_TEMPERATURE_CURRENT = "top_temperature_current"; | ||
public static final String MIDDLE_TEMPERATURE_TARGET = "middle_temperature_target"; | ||
public static final String MIDDLE_TEMPERATURE_CURRENT = "middle_temperature_current"; | ||
public static final String BOTTOM_TEMPERATURE_TARGET = "bottom_temperature_target"; | ||
public static final String BOTTOM_TEMPERATURE_CURRENT = "bottom_temperature_current"; | ||
public static final String LIGHT_SWITCH = "light_switch"; | ||
public static final String LIGHT_CAN_BE_CONTROLLED = "light_can_be_controlled"; | ||
public static final String PLATE_1_POWER_STEP = "plate_1_power_step"; | ||
public static final String PLATE_1_POWER_STEP_RAW = "plate_1_power_step_raw"; | ||
public static final String PLATE_2_POWER_STEP = "plate_2_power_step"; | ||
public static final String PLATE_2_POWER_STEP_RAW = "plate_2_power_step_raw"; | ||
public static final String PLATE_3_POWER_STEP = "plate_3_power_step"; | ||
public static final String PLATE_3_POWER_STEP_RAW = "plate_3_power_step_raw"; | ||
public static final String PLATE_4_POWER_STEP = "plate_4_power_step"; | ||
public static final String PLATE_4_POWER_STEP_RAW = "plate_4_power_step_raw"; | ||
public static final String PLATE_5_POWER_STEP = "plate_5_power_step"; | ||
public static final String PLATE_5_POWER_STEP_RAW = "plate_5_power_step_raw"; | ||
public static final String PLATE_6_POWER_STEP = "plate_6_power_step"; | ||
public static final String PLATE_6_POWER_STEP_RAW = "plate_6_power_step_raw"; | ||
public static final String DOOR_STATE = "door_state"; | ||
public static final String DOOR_ALARM = "door_alarm"; | ||
public static final String BATTERY_LEVEL = "battery_level"; | ||
} | ||
|
||
/** | ||
* Constants for i18n keys. | ||
*/ | ||
public static final class I18NKeys { | ||
private I18NKeys() { | ||
} | ||
|
||
public static final String BRIDGE_STATUS_DESCRIPTION_ACCESS_TOKEN_NOT_CONFIGURED = "@text/mielecloud.bridge.status.access.token.not.configured"; | ||
public static final String BRIDGE_STATUS_DESCRIPTION_ACCOUNT_NOT_AUTHORIZED = "@text/mielecloud.bridge.status.account.not.authorized"; | ||
public static final String BRIDGE_STATUS_DESCRIPTION_ACCESS_TOKEN_REFRESH_FAILED = "@text/mielecloud.bridge.status.access.token.refresh.failed"; | ||
public static final String BRIDGE_STATUS_DESCRIPTION_INVALID_EMAIL = "@text/mielecloud.bridge.status.invalid.email"; | ||
public static final String BRIDGE_STATUS_DESCRIPTION_TRANSIENT_HTTP_ERROR = "@text/mielecloud.bridge.status.transient.http.error"; | ||
|
||
public static final String THING_STATUS_DESCRIPTION_WEBSERVICE_MISSING = "@text/mielecloud.thing.status.webservice.missing"; | ||
public static final String THING_STATUS_DESCRIPTION_REMOVED = "@text/mielecloud.thing.status.removed"; | ||
public static final String THING_STATUS_DESCRIPTION_RATELIMIT = "@text/mielecloud.thing.status.ratelimit"; | ||
public static final String THING_STATUS_DESCRIPTION_DISCONNECTED = "@text/mielecloud.thing.status.disconnected"; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...mielecloud/src/main/java/org/openhab/binding/mielecloud/internal/auth/OAuthException.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,33 @@ | ||
/** | ||
* Copyright (c) 2010-2021 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* 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.openhab.binding.mielecloud.internal.auth; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
/** | ||
* Indicates an error in the OAuth2 authorization process. | ||
* | ||
* @author Roland Edelhoff - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class OAuthException extends RuntimeException { | ||
private static final long serialVersionUID = -1863609233382694104L; | ||
|
||
public OAuthException(final String message) { | ||
super(message); | ||
} | ||
|
||
public OAuthException(final String message, final Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...src/main/java/org/openhab/binding/mielecloud/internal/auth/OAuthTokenRefreshListener.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,30 @@ | ||
/** | ||
* Copyright (c) 2010-2021 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* 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.openhab.binding.mielecloud.internal.auth; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
/** | ||
* Listener that is invoked when an OAuth 2 access token was refreshed. | ||
* | ||
* @author Björn Lange - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public interface OAuthTokenRefreshListener { | ||
/** | ||
* Invoked when a new access token becomes available. | ||
* | ||
* @param accessToken The new access token. | ||
*/ | ||
public void onNewAccessToken(String accessToken); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you make this an unchecked exception by intention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we actually prefer unchecked exceptions. Shall we change it to a checked one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would fit better to the other code in this repo, but I won't insist on it. As you're using many lambdas converting could be painful.