File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed
src/jvmMain/kotlin/spp/protocol/service Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1717 */
1818package spp.protocol.service
1919
20+ import io.vertx.codegen.annotations.GenIgnore
2021import io.vertx.codegen.annotations.ProxyGen
2122import io.vertx.codegen.annotations.VertxGen
2223import io.vertx.core.Future
24+ import io.vertx.core.Vertx
25+ import io.vertx.core.eventbus.DeliveryOptions
2326import io.vertx.core.json.JsonObject
2427import kotlinx.datetime.Instant
28+ import spp.protocol.SourceServices
2529import spp.protocol.instrument.*
2630
2731/* *
@@ -33,6 +37,18 @@ import spp.protocol.instrument.*
3337@ProxyGen
3438@VertxGen
3539interface LiveInstrumentService {
40+
41+ @GenIgnore
42+ companion object {
43+ @JvmStatic
44+ fun createProxy (vertx : Vertx , authToken : String? = null): LiveInstrumentService {
45+ val deliveryOptions = DeliveryOptions ().apply {
46+ authToken?.let { addHeader(" auth-token" , it) }
47+ }
48+ return LiveInstrumentServiceVertxEBProxy (vertx, SourceServices .Utilize .LIVE_INSTRUMENT , deliveryOptions)
49+ }
50+ }
51+
3652 fun addLiveInstrument (instrument : LiveInstrument ): Future <LiveInstrument >
3753
3854 @JvmSuppressWildcards
Original file line number Diff line number Diff line change 1717 */
1818package spp.protocol.service
1919
20+ import io.vertx.codegen.annotations.GenIgnore
2021import io.vertx.codegen.annotations.ProxyGen
2122import io.vertx.codegen.annotations.VertxGen
2223import io.vertx.core.Future
24+ import io.vertx.core.Vertx
25+ import io.vertx.core.eventbus.DeliveryOptions
2326import io.vertx.core.json.JsonObject
27+ import spp.protocol.SourceServices
2428import spp.protocol.platform.developer.SelfInfo
2529import spp.protocol.platform.general.Service
2630import spp.protocol.platform.status.ActiveInstance
@@ -34,6 +38,17 @@ import spp.protocol.platform.status.ActiveInstance
3438@VertxGen
3539interface LiveService {
3640
41+ @GenIgnore
42+ companion object {
43+ @JvmStatic
44+ fun createProxy (vertx : Vertx , authToken : String? = null): LiveService {
45+ val deliveryOptions = DeliveryOptions ().apply {
46+ authToken?.let { addHeader(" auth-token" , it) }
47+ }
48+ return LiveServiceVertxEBProxy (vertx, SourceServices .Utilize .LIVE_SERVICE , deliveryOptions)
49+ }
50+ }
51+
3752 fun getClients (): Future <JsonObject >
3853 fun getStats (): Future <JsonObject >
3954 fun getSelf (): Future <SelfInfo >
Original file line number Diff line number Diff line change 1717 */
1818package spp.protocol.service
1919
20+ import io.vertx.codegen.annotations.GenIgnore
2021import io.vertx.codegen.annotations.ProxyGen
2122import io.vertx.codegen.annotations.VertxGen
2223import io.vertx.core.Future
24+ import io.vertx.core.Vertx
25+ import io.vertx.core.eventbus.DeliveryOptions
2326import io.vertx.core.json.JsonObject
27+ import spp.protocol.SourceServices
2428import spp.protocol.view.LiveViewSubscription
2529
2630/* *
@@ -32,6 +36,18 @@ import spp.protocol.view.LiveViewSubscription
3236@ProxyGen
3337@VertxGen
3438interface LiveViewService {
39+
40+ @GenIgnore
41+ companion object {
42+ @JvmStatic
43+ fun createProxy (vertx : Vertx , authToken : String? = null): LiveViewService {
44+ val deliveryOptions = DeliveryOptions ().apply {
45+ authToken?.let { addHeader(" auth-token" , it) }
46+ }
47+ return LiveViewServiceVertxEBProxy (vertx, SourceServices .Utilize .LIVE_VIEW , deliveryOptions)
48+ }
49+ }
50+
3551 fun addLiveViewSubscription (subscription : LiveViewSubscription ): Future <LiveViewSubscription >
3652 fun removeLiveViewSubscription (subscriptionId : String ): Future <LiveViewSubscription >
3753 fun getLiveViewSubscriptions (): Future <List <LiveViewSubscription >>
You can’t perform that action at this time.
0 commit comments