Skip to content

Commit 0bd3595

Browse files
authored
Merge pull request #39 from RobWin/lmos-kotlin-sdk
Lmos kotlin sdk
2 parents 9e41fe4 + 7f06991 commit 0bd3595

File tree

175 files changed

+1867
-193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+1867
-193
lines changed

build.gradle.kts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
plugins {
22
kotlin("jvm") version "2.0.20"
33
id("org.jetbrains.kotlinx.kover") version "0.8.3"
4+
id("org.cadixdev.licenser") version "0.6.1"
45
`maven-publish`
56
}
67

78
subprojects {
89
apply(plugin = "org.jetbrains.kotlin.jvm")
910
apply(plugin = "org.jetbrains.kotlinx.kover")
1011
apply(plugin = "maven-publish")
12+
apply(plugin = "org.cadixdev.licenser")
1113

1214
group = "ai.ancf.lmos"
13-
version = "0.1.0-SNAPSHOT"
15+
version = "0.1.3-SNAPSHOT"
16+
17+
license {
18+
header(rootProject.file("LICENSE"))
19+
include("**/*.java")
20+
include("**/*.kt")
21+
include("**/*.yaml")
22+
exclude("**/*.properties")
23+
}
24+
1425

1526
dependencies {
1627
testImplementation(kotlin("test"))

kotlin-wot-binding-http/src/main/kotlin/http/HttpClientConfig.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* SPDX-FileCopyrightText: Robert Winkler
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
17
package http
28

39
import ai.ancf.lmos.wot.security.SecurityScheme

kotlin-wot-binding-http/src/main/kotlin/http/HttpProtocolClient.kt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* SPDX-FileCopyrightText: Robert Winkler
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
17
package ai.ancf.lmos.wot.binding.http
28

39
import ai.ancf.lmos.wot.content.Content
@@ -124,8 +130,15 @@ fun createHttpClient(): HttpClient {
124130
engine {
125131
proxy = ProxyBuilder.http(proxyUrl)
126132
}
133+
install(HttpTimeout) {
134+
requestTimeoutMillis = 50000
135+
}
127136
}
128137
} else {
129-
HttpClient(CIO)
138+
HttpClient(CIO) {
139+
install(HttpTimeout) {
140+
requestTimeoutMillis = 50000
141+
}
142+
}
130143
}
131144
}

kotlin-wot-binding-http/src/main/kotlin/http/HttpProtocolClientFactory.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* SPDX-FileCopyrightText: Robert Winkler
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
17
package ai.ancf.lmos.wot.binding.http
28

39
import ai.anfc.lmos.wot.binding.ProtocolClient

kotlin-wot-binding-http/src/main/kotlin/http/HttpProtocolServer.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* SPDX-FileCopyrightText: Robert Winkler
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
17
package ai.ancf.lmos.wot.binding.http
28

39
import ai.ancf.lmos.wot.JsonMapper

kotlin-wot-binding-http/src/main/kotlin/http/HttpsProtocolClientFactory.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* SPDX-FileCopyrightText: Robert Winkler
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
17
package ai.ancf.lmos.wot.binding.http
28

39
/**

kotlin-wot-binding-http/src/main/kotlin/http/routes/AbstractRoute.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* SPDX-FileCopyrightText: Robert Winkler
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
17
package ai.ancf.lmos.wot.binding.http.routes
28

39
import ai.ancf.lmos.wot.binding.http.routes.AbstractRoute

kotlin-wot-binding-http/src/main/kotlin/http/routes/ThingsRoute.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* SPDX-FileCopyrightText: Robert Winkler
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
17
package ai.ancf.lmos.wot.binding.http.routes
28

39
import ai.ancf.lmos.wot.content.Content

kotlin-wot-binding-http/src/test/kotlin/http/HttpProtocolClientFactoryTest.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* SPDX-FileCopyrightText: Robert Winkler
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
17
package ai.ancf.lmos.wot.binding.http
28

39
import kotlin.test.Test

kotlin-wot-binding-http/src/test/kotlin/http/HttpProtocolClientTest.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* SPDX-FileCopyrightText: Robert Winkler
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
17
package ai.ancf.lmos.wot.binding.http
28
import ai.ancf.lmos.wot.content.Content
39
import ai.ancf.lmos.wot.security.BasicSecurityScheme

0 commit comments

Comments
 (0)