Interface ServerTlsCredentialSupplierFactoryContext
Construction context for ServerTlsCredentialSupplier instances.
This context is provided to ServerTlsCredentialSupplierFactory methods
during initialization and supplier creation. It provides access to the plugin
infrastructure, allowing factories to discover and instantiate nested plugins.
Plugin Composition
The context supports plugin composition through pluginInstance(Class, String),
enabling credential supplier factories to depend on other plugins such as key
management services, certificate authorities, or secret stores.
Usage Example
@Plugin(configType = MySupplierConfig.class)
public class MySupplierFactory implements ServerTlsCredentialSupplierFactory<MySupplierConfig, Context> {
@Override
public Context initialize(ServerTlsCredentialSupplierFactoryContext context, MySupplierConfig config) {
// Get a nested plugin instance for key management
KeyManagementService kms = context.pluginInstance(KeyManagementService.class, config.kmsName());
return new Context(config, kms);
}
@Override
public ServerTlsCredentialSupplier create(ServerTlsCredentialSupplierFactoryContext context, Context initData) {
return new MyCredentialSupplier(initData);
}
}
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the filter dispatch executor for asynchronous operations.pluginImplementationNames(Class<P> pluginClass) Returns the implementation names of all registered instances of a plugin type.<P> PpluginInstance(Class<P> pluginClass, String implementationName) Gets a plugin instance for the given plugin type and implementation name.
-
Method Details
-
pluginInstance
Gets a plugin instance for the given plugin type and implementation name.
- Type Parameters:
P- The plugin interface type- Parameters:
pluginClass- The plugin interface classimplementationName- The specific plugin implementation name to instantiate- Returns:
- The plugin instance
- Throws:
UnknownPluginInstanceException- if the plugin with the given implementation name is unknown
-
pluginImplementationNames
Returns the implementation names of all registered instances of a plugin type.
- Type Parameters:
P- The plugin interface type- Parameters:
pluginClass- The plugin interface class- Returns:
- Set of known implementation names registered for the given plugin type
-
filterDispatchExecutor
Returns the filter dispatch executor for asynchronous operations.
Note: the executor is not available during
ServerTlsCredentialSupplierFactory.initialize(ServerTlsCredentialSupplierFactoryContext, Object). Calling this method during initialisation will throwIllegalStateException.- Returns:
- The filter dispatch executor for this context
- Throws:
IllegalStateException- if called during factory initialisation
-