Examples of collectPlugins()


Examples of org.apache.logging.log4j.core.config.plugins.PluginManager.collectPlugins()

     */
    public PatternParser(final Configuration config, final String converterKey, final Class<?> expectedClass,
                         final Class<?> filterClass) {
        this.config = config;
        final PluginManager manager = new PluginManager(converterKey, expectedClass);
        manager.collectPlugins();
        final Map<String, PluginType> plugins = manager.getPlugins();
        final Map<String, Class<PatternConverter>> converters = new HashMap<String, Class<PatternConverter>>();

        for (final PluginType type : plugins.values()) {
            try {
View Full Code Here

Examples of org.apache.logging.log4j.core.config.plugins.PluginManager.collectPlugins()

    protected PluginManager getPluginManager() {
        //don't cache a pluginmanager instance - packages may be updated, requiring
        // re-discovery of plugins
        final PluginManager mgr = new PluginManager("Core");
        mgr.collectPlugins();
        return mgr;
    }

    /**
     * Set the name of the configuration.
View Full Code Here

Examples of org.apache.logging.log4j.core.config.plugins.PluginManager.collectPlugins()

                        break;
                    }
                }
                if (key != null) {
                    final PluginManager manager = new PluginManager("KeyProvider", SecretKeyProvider.class);
                    manager.collectPlugins();
                    final Map<String, PluginType> plugins = manager.getPlugins();
                    if (plugins != null) {
                        boolean found = false;
                        for (final Map.Entry<String, PluginType> entry : plugins.entrySet()) {
                            if (entry.getKey().equalsIgnoreCase(key)) {
View Full Code Here

Examples of org.apache.logging.log4j.core.config.plugins.PluginManager.collectPlugins()

    private final StrLookup defaultLookup;

    public Interpolator(StrLookup defaultLookup) {
        this.defaultLookup = defaultLookup == null ? new MapLookup(new HashMap<String, String>()) : defaultLookup;
        PluginManager manager = new PluginManager("Lookup");
        manager.collectPlugins();
        Map<String, PluginType> plugins = manager.getPlugins();

        for (Map.Entry<String, PluginType> entry : plugins.entrySet()) {
            Class<StrLookup> clazz = entry.getValue().getPluginClass();
            try {
View Full Code Here

Examples of org.apache.logging.log4j.core.config.plugins.PluginManager.collectPlugins()

     * @param expected The expected base Class of each Converter.
     */
    public PatternParser(Configuration config, String converterKey, Class expected) {
        this.config = config;
        PluginManager manager = new PluginManager(converterKey, expected);
        manager.collectPlugins();
        Map<String, PluginType> plugins = manager.getPlugins();
        Map<String, Class<PatternConverter>> converters = new HashMap<String, Class<PatternConverter>>();

        for (PluginType type : plugins.values()) {
            try {
View Full Code Here

Examples of org.apache.logging.log4j.core.config.plugins.PluginManager.collectPlugins()

        String factoryClass = System.getProperty(CONFIGURATION_FACTORY_PROPERTY);
        if (factoryClass != null) {
            addFactory(factoryClass);
        }
        PluginManager manager = new PluginManager("ConfigurationFactory");
        manager.collectPlugins();
        Map<String, PluginType> plugins = manager.getPlugins();
        Set<WeightedFactory> ordered = new TreeSet<WeightedFactory>();
        for (PluginType type : plugins.values()) {
            try {
                Class<ConfigurationFactory> clazz = type.getPluginClass();
View Full Code Here

Examples of org.apache.logging.log4j.core.config.plugins.PluginManager.collectPlugins()

     */
    @Override
    public void start() {
        pluginManager.collectPlugins();
        PluginManager levelPlugins = new PluginManager("Level");
        levelPlugins.collectPlugins();
        Map<String, PluginType<?>> plugins = levelPlugins.getPlugins();
        if (plugins != null) {
            for (PluginType<?> type : plugins.values()) {
                try {
                    // Cause the class to be initialized if it isn't already.
View Full Code Here

Examples of org.apache.logging.log4j.core.config.plugins.PluginManager.collectPlugins()

    private final StrLookup defaultLookup;

    public Interpolator(final StrLookup defaultLookup) {
        this.defaultLookup = defaultLookup == null ? new MapLookup(new HashMap<String, String>()) : defaultLookup;
        final PluginManager manager = new PluginManager("Lookup");
        manager.collectPlugins();
        final Map<String, PluginType<?>> plugins = manager.getPlugins();

        for (final Map.Entry<String, PluginType<?>> entry : plugins.entrySet()) {
            @SuppressWarnings("unchecked")
            final Class<? extends StrLookup> clazz = (Class<? extends StrLookup>) entry.getValue().getPluginClass();
View Full Code Here

Examples of org.apache.logging.log4j.core.config.plugins.PluginManager.collectPlugins()

                    final String factoryClass = PropertiesUtil.getProperties().getStringProperty(CONFIGURATION_FACTORY_PROPERTY);
                    if (factoryClass != null) {
                        addFactory(list, factoryClass);
                    }
                    final PluginManager manager = new PluginManager("ConfigurationFactory");
                    manager.collectPlugins();
                    final Map<String, PluginType<?>> plugins = manager.getPlugins();
                    final Set<WeightedFactory> ordered = new TreeSet<WeightedFactory>();
                    for (final PluginType<?> type : plugins.values()) {
                        try {
                            @SuppressWarnings("unchecked")
View Full Code Here

Examples of org.apache.logging.log4j.core.config.plugins.PluginManager.collectPlugins()

     */
    public PatternParser(final Configuration config, final String converterKey, final Class<?> expectedClass,
            final Class<?> filterClass) {
        this.config = config;
        final PluginManager manager = new PluginManager(converterKey, expectedClass);
        manager.collectPlugins();
        final Map<String, PluginType<?>> plugins = manager.getPlugins();
        final Map<String, Class<PatternConverter>> converters = new HashMap<String, Class<PatternConverter>>();

        for (final PluginType<?> type : plugins.values()) {
            try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.