Plugin

@Type(id = "plugin")
interface Plugin : Named, ContextAware, Provider, MetaRepr

The interface to define a Context plugin. A plugin stores all runtime features of a context. The plugin is by default configurable and a Provider (both features could be ignored). The plugin must in most cases have an empty constructor in order to be able to load it from library.

The plugin lifecycle is the following:

create - configure - attach - detach - destroy

Types

Companion
Link copied to clipboard
common
object Companion

Functions

attach
Link copied to clipboard
common
abstract fun attach(context: Context)

Start this plugin and attach registration info to the context. This method should be called only via PluginManager to avoid dependency issues.

content
Link copied to clipboard
common
open fun content(target: String): Map<Name, Any>

A map of direct children for specific target

dependsOn
Link copied to clipboard
common
abstract fun dependsOn(): Map<PluginFactory<*>, Meta>

Plugin dependencies which are required to attach this plugin. Plugin dependencies must be initialized and enabled in the Context before this plugin is enabled.

detach
Link copied to clipboard
common
abstract fun detach()

Stop this plugin and remove registration info from context and other plugins. This method should be called only via PluginManager to avoid dependency issues.

toMeta
Link copied to clipboard
common
open override fun toMeta(): Meta

Properties

context
Link copied to clipboard
common
abstract val context: Context

Get context for this object

defaultChainTarget
Link copied to clipboard
common
open val defaultChainTarget: String

Default target for next chain segment

defaultTarget
Link copied to clipboard
common
open val defaultTarget: String

Default target for this provider

meta
Link copied to clipboard
common
abstract val meta: Meta
name
Link copied to clipboard
common
open override val name: Name

The name of this plugin ignoring version and group

tag
Link copied to clipboard
common
abstract val tag: PluginTag

Get tag for this plugin

Inheritors

AbstractPlugin
Link copied to clipboard
LogManager
Link copied to clipboard