Examples of OpStringParser


Examples of org.rioproject.impl.opstring.OpStringParser

    @Test
    public void testLoadingConfigurationAsHttpResource() throws IOException, ConfigurationException {
        Webster webster = new Webster(0, System.getProperty("user.dir")+"/src/test/resources");
        System.setProperty("TEST_PORT", Integer.toString(webster.getPort()));
        OpStringParser opStringParser = new GroovyDSLOpStringParser();
        File file = new File("src/test/resources/opstring/simple_opstring_with_http_config.groovy");
        List<OpString> opStrings = opStringParser.parse(file,   // opstring
                                                        null,     // parent classloader
                                                        null,     // defaultGroups
                                                        null);    // loadPath
        ServiceElement serviceElement = opStrings.get(0).getServices()[0];
View Full Code Here

Examples of org.rioproject.impl.opstring.OpStringParser

* @author Jerome Bernard
*/
public class DefaultOpStringParserSelectionStrategy implements OpStringParserSelectionStrategy {

    public OpStringParser findParser(Object source) {
        OpStringParser parser;
        String filename;

        // handle either local filename or URL as source
        if (source instanceof URL || source instanceof File) {
            filename = source.toString();
View Full Code Here

Examples of org.rioproject.impl.opstring.OpStringParser

*/
public class AssociationManagementSettingsTest {
    @Test
    public void testAssociationManagementParsing() {
        File file = new File("src/test/resources/opstrings/association_management.groovy");
        OpStringParser dslParser = new GroovyDSLOpStringParser();
        List<OpString> opstrings = dslParser.parse(file, null, null, null);
        Assert.assertEquals("There should be one and only one opstring", 1, opstrings.size());
        OpString opstring = opstrings.get(0);
        ServiceElement serviceElement = opstring.getServices()[0];
        Assert.assertEquals(15, serviceElement.getAssociationDescriptors()[0].getServiceDiscoveryTimeout());
        Assert.assertEquals(TimeUnit.SECONDS, serviceElement.getAssociationDescriptors()[0].getServiceDiscoveryTimeUnits());
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.