/cre-component-runtime

Core module for managing cre components

Primary LanguageKotlinMIT LicenseMIT

cre-component-runtime

Core module for managing components. Publish locally with gradlew publishToMavenLocal.

Load Component

val componentUrl = javaClass.getResource("/helloComponent.jar")!!
val component = componentUrl.loadComponent()
component.start()

For more information, see Loader.

Work with Cache

// Get cached components from current session
val components = CRECache.getAllComponents()

// Restore components from previous sessions
CRECache.restore()  

For more information, see Cache.

Read Log Messages from Components

CRELog.subscribe(listener)

class Listener : LogListener {
        override fun invoke(msg: ComponentLogMessage) = 
        println(logMessage)
}

For more information, see Log.