forked from eclipse-hono/hono-extras
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#19] Enhance device communication API
* added support for device states * added support for request/response commands * added automatic Pub/Sub tenant topic & subscription creation and deletion * added automatically sending of a config in case a config is requested or a new one created * extended config table with error field * formatted device communication api code Signed-off-by: Matthias Kaemmer <[email protected]>
- Loading branch information
Showing
81 changed files
with
3,508 additions
and
710 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
44 changes: 44 additions & 0 deletions
44
...unication/src/main/java/org/eclipse/hono/communication/api/config/ApiCommonConstants.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,44 @@ | ||
/* | ||
* *********************************************************** | ||
* Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
* <p> | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* <p> | ||
* 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 | ||
* <p> | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* ********************************************************** | ||
* | ||
*/ | ||
|
||
package org.eclipse.hono.communication.api.config; | ||
|
||
/** | ||
* Device constant values. | ||
*/ | ||
public final class ApiCommonConstants { | ||
|
||
/** | ||
* Path parameter name for tenantId. | ||
*/ | ||
public static final String TENANT_PATH_PARAMS = "tenantid"; | ||
/** | ||
* Path parameter name for deviceId. | ||
*/ | ||
public static final String DEVICE_PATH_PARAMS = "deviceid"; | ||
/** | ||
* Caption for tenantId. | ||
*/ | ||
public static final String TENANT_ID_CAPTION = "tenantId"; | ||
/** | ||
* Caption for deviceId. | ||
*/ | ||
public static final String DEVICE_ID_CAPTION = "deviceId"; | ||
|
||
private ApiCommonConstants() { | ||
// avoid instantiation | ||
} | ||
} |
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
41 changes: 41 additions & 0 deletions
41
...cation/src/main/java/org/eclipse/hono/communication/api/config/DeviceStatesConstants.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,41 @@ | ||
/* | ||
* *********************************************************** | ||
* Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
* <p> | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* <p> | ||
* 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 | ||
* <p> | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* ********************************************************** | ||
* | ||
*/ | ||
|
||
package org.eclipse.hono.communication.api.config; | ||
|
||
/** | ||
* Device states constant values. | ||
*/ | ||
public final class DeviceStatesConstants { | ||
|
||
/** | ||
* OpenApi GET device states operation id. | ||
*/ | ||
public static final String LIST_STATES_OP_ID = "listStates"; | ||
/** | ||
* Path parameter name for number of states. | ||
*/ | ||
|
||
public static final String NUM_STATES_QUERY_PARAMS = "numStates"; | ||
/** | ||
* Sql migrations script path. | ||
*/ | ||
public static final String CREATE_SQL_SCRIPT_PATH = "db/v1_create_state_table.sql"; | ||
|
||
private DeviceStatesConstants() { | ||
// avoid instantiation | ||
} | ||
} |
Oops, something went wrong.