File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
framework-client-api/src/main/java/io/axoniq/platform/framework/api
framework-client-messaging/src/main/java/io/axoniq/platform/framework/client Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ data class SupportedFeatures(
110110 val domainEventsInsights : DomainEventAccessMode = DomainEventAccessMode .NONE ,
111111 /* Whether the client supports client status updates .*/
112112 val clientStatusUpdates : Boolean? = false ,
113+ /* Whether the application has the entitlement manager configured, allowing it to receive licenses */
114+ val licenseEntitlement : Boolean? = false ,
113115)
114116
115117data class Versions (
Original file line number Diff line number Diff line change @@ -44,8 +44,6 @@ import org.axonframework.conversion.Converter
4444import org.axonframework.messaging.commandhandling.CommandBus
4545import org.axonframework.messaging.commandhandling.distributed.PayloadConvertingCommandBusConnector
4646import org.axonframework.messaging.commandhandling.interception.InterceptingCommandBus
47- import org.axonframework.messaging.core.MessageDispatchInterceptor
48- import org.axonframework.messaging.core.MessageHandlerInterceptor
4947import org.axonframework.messaging.core.SubscribableEventSource
5048import org.axonframework.messaging.eventhandling.EventSink
5149import org.axonframework.messaging.eventhandling.processing.EventProcessor
@@ -83,6 +81,7 @@ class SetupPayloadCreator(
8381 heartbeat = true ,
8482 threadDump = true ,
8583 clientStatusUpdates = true ,
84+ licenseEntitlement = hasEntitlementManager()
8685 )
8786 )
8887 }
@@ -339,6 +338,18 @@ class SetupPayloadCreator(
339338 ))?.javaClass?.simpleName?.let { SerializerInformation (type = it, false ) }
340339 }
341340
341+
342+ /* *
343+ * Checks whether the PlatformLicenseSource have been configured, in which case we want updates of licenses from Platform.
344+ */
345+ private fun hasEntitlementManager (): Boolean {
346+ try {
347+ val entitlementManagerClazz = Class .forName(" io.axoniq.license.entitlement.source.LicenseSource" )
348+ return configuration.getComponents(entitlementManagerClazz).any { it.value::class .java.name == " io.axoniq.license.entitlement.source.PlatformLicenseSource" }
349+ } catch (_: ClassNotFoundException ) {
350+ return false
351+ }
352+ }
342353}
343354
344355
You can’t perform that action at this time.
0 commit comments