Package tv.ustream.yolo.module.parser

Examples of tv.ustream.yolo.module.parser.IParser


        Map<String, Object> config = new HashMap<String, Object>();
        config.put("class", PassThruParser.class.getCanonicalName());
        config.put("processors", processors);

        IParser parser = new ModuleFactory().createParser("x", config);

        Assert.assertEquals(PassThruParser.class, parser.getClass());
    }
View Full Code Here


    {
        thrown.expect(ConfigException.class);

        Map<String, Object> config = new HashMap<String, Object>();

        IParser parser = new ModuleFactory().createParser("pr1", config);

        Assert.assertEquals(ConsoleProcessor.class, parser.getClass());
    }
View Full Code Here

        Map<String, Object> config = new HashMap<String, Object>();
        config.put("class", PassThruParser.class.getCanonicalName());
        config.put("processors", processors);
        config.put("enabled", false);

        IParser parser = new ModuleFactory().createParser("x", config);

        Assert.assertNull(parser);
    }
View Full Code Here

        if (!(Boolean) rawConfig.get("enabled"))
        {
            return null;
        }

        IParser parser = create((String) rawConfig.get("class"));

        setupModule(name, parser, rawConfig);

        return parser;
    }
View Full Code Here

        System.out.println("Available parsers");
        System.out.println("-----------------");
        System.out.println();
        for (String className : AVAILABLE_PARSERS)
        {
            IParser module = factory.create(className);
            ConfigMap config = getDefaultParserModuleConfig().merge(module.getModuleConfig());
            String usage = "  - params: " + config.getDescription("    ");

            System.out.format("* %s - %s%n%s%n", className, module.getModuleDescription(), usage);
        }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    private void addParser(String name, Map<String, Object> config) throws ConfigException
    {
        LOG.info("Adding {} parser {}", name, config);

        IParser parser = moduleFactory.createParser(name, config);

        if (parser == null)
        {
            return;
        }
View Full Code Here

TOP

Related Classes of tv.ustream.yolo.module.parser.IParser

Copyright © 2018 www.massapicom. 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.