Skip to content

Commit 22fc9f4

Browse files
committed
initial commit of the test client for the iotdemogateway
1 parent 6ff284a commit 22fc9f4

13 files changed

Lines changed: 1226 additions & 0 deletions

File tree

IotGatewayDemoClient/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/.classpath
2+
/.factorypath
3+
/.project
4+
/.settings/
5+
/target/

IotGatewayDemoClient/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#IotGatewayDemoClient
2+
3+
This client code simplifies the test of sending test data to the IotGatewayDemo.
4+
5+
You will need to specify the miconaut config file location when running by adding `-Dmicronaut.config.files=config/config.yml` to the arguments when running the Application class.
6+
7+
In the config file specify the hostname (or IP address) of the machine running the IotDemoGateway, and the port it's running on.
8+
9+
Also specify the names of the compartment that the iot domain group and iot domain are in, along with the vault used to hold the secrets containing the instance credentials. You will also need to specify the iot domain group name and the iot domain name. These must have already been created.
10+
11+
You will also need the TimGUtils package (v 1.2.2 at a minimum) as that handles various IO functions, this is not currently held in the central Maven repo, but the source can be accessed from https://github.com/atimgraves/timg-utilities
12+
13+
Note that if you chose to use the JSON or XML upload options that these are using the IoT data structure specified in the IotDemoGateway test model, adapters and envelope. If you have not set those up then the IoT service will be unable to parse the data.
14+
15+
Once running the application the options are self explanatory (I hope). When being asked for input in some cases a default value is given, you can just press return to use it. If n default is given suitable input must be provided.
16+
17+
18+
## Micronaut 4.10.8 Documentation
19+
20+
- [User Guide](https://docs.micronaut.io/4.10.8/guide/index.html)
21+
- [API Reference](https://docs.micronaut.io/4.10.8/api/index.html)
22+
- [Configuration Reference](https://docs.micronaut.io/4.10.8/guide/configurationreference.html)
23+
- [Micronaut Guides](https://guides.micronaut.io/index.html)
24+
---
25+
26+
- [Micronaut Maven Plugin documentation](https://micronaut-projects.github.io/micronaut-maven-plugin/latest/)
27+
## Feature micronaut-aot documentation
28+
29+
- [Micronaut AOT documentation](https://micronaut-projects.github.io/micronaut-aot/latest/guide/)
30+
31+
32+
## Feature http-client documentation
33+
34+
- [Micronaut HTTP Client documentation](https://docs.micronaut.io/latest/guide/index.html#nettyHttpClient)
35+
36+
37+
## Feature jackson-xml documentation
38+
39+
- [Micronaut Jackson XML serialization/deserialization documentation](https://micronaut-projects.github.io/micronaut-jackson-xml/latest/guide/index.html)
40+
41+
- [https://github.com/FasterXML/jackson-dataformat-xml](https://github.com/FasterXML/jackson-dataformat-xml)
42+
43+
44+
## Feature serialization-jackson documentation
45+
46+
- [Micronaut Serialization Jackson Core documentation](https://micronaut-projects.github.io/micronaut-serialization/latest/guide/)
47+
48+
49+
## Feature maven-enforcer-plugin documentation
50+
51+
- [https://maven.apache.org/enforcer/maven-enforcer-plugin/](https://maven.apache.org/enforcer/maven-enforcer-plugin/)
52+
53+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# AOT configuration properties for jar packaging
2+
# Please review carefully the optimizations enabled below
3+
# Check https://micronaut-projects.github.io/micronaut-aot/latest/guide/ for more details
4+
5+
# Caches environment property values: environment properties will be deemed immutable after application startup.
6+
cached.environment.enabled=true
7+
8+
# Precomputes Micronaut configuration property keys from the current environment variables
9+
precompute.environment.properties.enabled=true
10+
11+
# Replaces logback.xml with a pure Java configuration
12+
logback.xml.to.java.enabled=true
13+
14+
# Converts configuration files from YAML and properties to Java configuration
15+
property-source-loader.generate.enabled=true
16+
17+
# Scans for service types ahead-of-time, avoiding classpath scanning at startup
18+
serviceloading.jit.enabled=true
19+
20+
# Scans reactive types at build time instead of runtime
21+
scan.reactive.types.enabled=true
22+
23+
# Deduces the environment at build time instead of runtime
24+
deduce.environment.enabled=true
25+
26+
# Checks for the existence of some types at build time instead of runtime
27+
known.missing.types.enabled=true
28+
29+
# Precomputes property sources at build time
30+
sealed.property.source.enabled=true
31+
32+
# The list of service types to be scanned (comma separated)
33+
service.types=io.micronaut.context.env.PropertySourceLoader,io.micronaut.inject.BeanConfiguration,io.micronaut.inject.BeanDefinitionReference,io.micronaut.http.HttpRequestFactory,io.micronaut.http.HttpResponseFactory,io.micronaut.core.beans.BeanIntrospectionReference,io.micronaut.core.convert.TypeConverterRegistrar,io.micronaut.context.env.PropertyExpressionResolver
34+
35+
# A list of types that the AOT analyzer needs to check for existence (comma separated)
36+
known.missing.types.list=io.reactivex.Observable,reactor.core.publisher.Flux,kotlinx.coroutines.flow.Flow,io.reactivex.rxjava3.core.Flowable,io.reactivex.rxjava3.core.Observable,io.reactivex.Single,reactor.core.publisher.Mono,io.reactivex.Maybe,io.reactivex.rxjava3.core.Single,io.reactivex.rxjava3.core.Maybe,io.reactivex.Completable,io.reactivex.rxjava3.core.Completable,io.methvin.watchservice.MacOSXListeningWatchService,io.micronaut.core.async.publisher.CompletableFuturePublisher,io.micronaut.core.async.publisher.Publishers.JustPublisher,io.micronaut.core.async.subscriber.Completable
37+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
iotgateway:
2+
host: "localhost"
3+
port: 8123
4+
5+
oci:
6+
iot:
7+
compartmentname: "/domain-specialists/tim.graves/iot"
8+
iotdomaingroupname: "iot-domain-group-timg"
9+
iotdomainname: "iot-domain-timg"
10+
11+
micronaut:
12+
http:
13+
services:
14+
iotgatewayserver:
15+
url: "http://${iotgateway.host}:${iotgateway.port}"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
applicationType: default
2+
defaultPackage: com.oracle.timg.demo.iot
3+
testFramework: junit
4+
sourceLanguage: java
5+
buildTool: maven
6+
features: [app-name, http-client, jackson-xml, java, java-application, junit, logback, maven, maven-enforcer-plugin, micronaut-aot, micronaut-http-validation, micronaut-processing-compiler-args, netty-server, properties, readme, serialization-jackson, shade, static-resources]

0 commit comments

Comments
 (0)