org.wildfly.swarm.config.elytron.ProviderLoader Maven / Gradle / Ivy
package org.wildfly.swarm.config.elytron;
import org.wildfly.swarm.config.runtime.AttributeDocumentation;
import org.wildfly.swarm.config.runtime.ResourceDocumentation;
import org.wildfly.swarm.config.runtime.SingletonResource;
import org.wildfly.swarm.config.runtime.Address;
import org.wildfly.swarm.config.runtime.ResourceType;
import java.beans.PropertyChangeSupport;
import java.beans.PropertyChangeListener;
import org.wildfly.swarm.config.runtime.ModelNodeBinding;
import java.util.List;
import java.util.Map;
import java.util.Arrays;
import java.util.stream.Collectors;
/**
* A definition for a Provider loader.
*/
@Address("/subsystem=elytron/provider-loader=*")
@ResourceType("provider-loader")
public class ProviderLoader>
implements
org.wildfly.swarm.config.runtime.Keyed {
private String key;
private PropertyChangeSupport pcs;
@AttributeDocumentation("The list of providers loaded by this provider loader.")
private List loadedProviders;
@AttributeDocumentation("The fully qualified class names of the providers to load, these are loaded after the service-loader discovered providers and duplicates will be skipped.")
private List classNames;
@AttributeDocumentation("The name of the module to load the provider from.")
private String module;
@AttributeDocumentation("An argument to be passed into the constructor as the Provider is instantiated.")
private String argument;
@AttributeDocumentation("The key/value configuration to be passed to the Provider to initialise it.")
private Map configuration;
@AttributeDocumentation("The path of the file to use to initialise the providers.")
private String path;
@AttributeDocumentation("The base path of the configuration file.")
private String relativeTo;
public ProviderLoader(java.lang.String key) {
super();
this.key = key;
}
public String getKey() {
return this.key;
}
/**
* Adds a property change listener
*/
public void addPropertyChangeListener(PropertyChangeListener listener) {
if (null == this.pcs)
this.pcs = new PropertyChangeSupport(this);
this.pcs.addPropertyChangeListener(listener);
}
/**
* Removes a property change listener
*/
public void removePropertyChangeListener(
java.beans.PropertyChangeListener listener) {
if (this.pcs != null)
this.pcs.removePropertyChangeListener(listener);
}
/**
* The list of providers loaded by this provider loader.
*/
@ModelNodeBinding(detypedName = "loaded-providers")
public List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy