public interface PluginDescriptor<C extends Configuration>
The server loads plugin descriptors using Java's ServiceLoader
mechanism. However, the server
only scans for implementations of specific subtypes of PluginDescriptor
, not of PluginDescriptor
itself.
This means that this interface should not be implemented directly.
All subtypes of PluginDescriptor
scanned by the server can be found in the package
se.curity.identityserver.sdk.plugin.descriptor
.
An implementation of a PluginDescriptor
subtype must be a concrete class with a default constructor.
Modifier and Type | Method and Description |
---|---|
default Optional<? extends ManagedObject<C>> |
createManagedObject(C configuration)
Creates a new
ManagedObject for managing the life-cycle of this plugin. |
Class<? extends C> |
getConfigurationType()
Returns the configuration interface used by this plugin.
|
String |
getPluginImplementationType()
Returns the plugin implementation type.
|
String getPluginImplementationType()
Class<? extends C> getConfigurationType()
Only interfaces are allowed. Anything else, like a class
or abstract class
, will cause the
plugin descriptor to be rejected when the server attempts to load it.
default Optional<? extends ManagedObject<C>> createManagedObject(C configuration)
ManagedObject
for managing the life-cycle of this plugin.
Called on configuration changes for instances of this plugin.
May return an empty Optional
, if life-cycle management isn't required for this plugin.
The default implementation of this method returns an empty Optional.
configuration
- the updated configuration for the plugin. This configuration object cannot
provide service instances, only primitive configuration data. Trying to
get a service from this object will cause an error at runtime.ManagedObject
type for this plugin. This can be used to manage the plugin
lifecycle.