Skip to content

Instantly share code, notes, and snippets.

@aadrian
Created October 3, 2023 20:06
Show Gist options
  • Save aadrian/931db30dcd26744895621a99ba9b52c3 to your computer and use it in GitHub Desktop.
Save aadrian/931db30dcd26744895621a99ba9b52c3 to your computer and use it in GitHub Desktop.
@startuml
hide empty description
skinparam linetype ortho
[*] -d-> CREATED
note right of CREATED
After the <b>PluginManager</b> was initialised or added the plugin
to the <b>PluginRepository</b> manually.
At this time a plugin wrapper is created, but the plugin class
is not loaded. Of course, the plugin can't be invoked yet.
end note
CREATED -down-> LOADED
note right of LOADED
After the method //load()// was invoked.
At this time, the plugin can be set to unload, disabled and
can be invoked, started, stopped.
end note
LOADED -down-> STARTED
note right of STARTED
After the method //start()// was invoked.
The plugin is running or finished at this time.
end note
STARTED -down-> STOPPED
note right of STOPPED
After the method //stop()// was invoked.
The entire plugin has ended (like threads, cleanup, etc.)
end note
STOPPED -down-> UNLOADED
note right of UNLOADED
After the method //unload()// was invoked.
The plugin returns to the state that it can't be invoked, but does exist
in the <b>PluginManager</b>.
The plugin can be reloaded by calling //load()// once again. Users can remove
or delete the plugin at this stage.
end note
UNLOADED -down-> DESTROYED
note right of DESTROYED
After the method //remove()// was invoked.
Everything from the plugin is removed. The <b>PluginManager</b> removes the
plugin from the <b>PluginRepository</b>. The plugin can't be recognized
until it is added again or a new <b>PluginManager</b> is created.
end note
LOADED -left[dotted]-> STOPPED
UNLOADED --up[dotted]-> LOADED
CREATED --left--> DISABLED
DISABLED --right--> DESTROYED
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment