Examples of GlobalFlowController


Examples of org.geoserver.flow.controller.GlobalFlowController

        BasicOWSController oc = (BasicOWSController) controllers.get(1);
        assertEquals(8, oc.getPriority());
        assertEquals("wms", oc.getService());
        assertEquals("getmap", oc.getMethod());
        assertNull(oc.getOutputFormat());
        GlobalFlowController gc = (GlobalFlowController) controllers.get(2);
        assertEquals(100, gc.getPriority());
    }
View Full Code Here

Examples of org.geoserver.flow.controller.GlobalFlowController

public class GlobalFlowControllerTest extends AbstractFlowControllerTest {
    private static final long MAX_WAIT = 1000;
   
    public void testPriority() {
        GlobalFlowController controller = new GlobalFlowController(1);
        // priority == queue size
        assertEquals(1, controller.getPriority());
    }
View Full Code Here

Examples of org.geoserver.flow.controller.GlobalFlowController

        assertEquals(1, controller.getPriority());
    }

    public void testSingleDelay() throws Exception {
        // create a single item flow controller
        GlobalFlowController controller = new GlobalFlowController(1);

        // make three testing threads that will "process" forever, until we interrupt them
        FlowControllerTestingThread t1 = new FlowControllerTestingThread(controller, new Request(),
                0, Long.MAX_VALUE);
        FlowControllerTestingThread t2 = new FlowControllerTestingThread(controller, new Request(),
View Full Code Here

Examples of org.geoserver.flow.controller.GlobalFlowController

        }
    }
   
    public void testTimeout() {
        // create a single item flow controller
        GlobalFlowController controller = new GlobalFlowController(1);

        // make two testing threads that will "process" for 400ms, but with a timeout of 200 on the
        // flow controller
        FlowControllerTestingThread t1 = new FlowControllerTestingThread(controller, new Request(),
                100, 400);
View Full Code Here

Examples of org.geoserver.flow.controller.GlobalFlowController

            if ("timeout".equalsIgnoreCase(key)) {
                timeout = queueSize * 1000;
                continue;
            }
            if ("ows.global".equalsIgnoreCase(key)) {
                controller = new GlobalFlowController(queueSize);
            } else if ("ows".equals(keys[0])) {
                // todo: check, if possible, if the service, method and output format actually exist
                if (keys.length >= 4) {
                    controller = new BasicOWSController(keys[1], keys[2], keys[3], queueSize);
                } else if (keys.length == 3) {
View Full Code Here

Examples of org.geoserver.flow.controller.GlobalFlowController

            if ("timeout".equalsIgnoreCase(key)) {
                timeout = queueSize * 1000;
                continue;
            }
            if ("ows.global".equalsIgnoreCase(key)) {
                controller = new GlobalFlowController(queueSize);
            } else if ("ows".equals(keys[0])) {
                // todo: check, if possible, if the service, method and output format actually exist
                if (keys.length >= 4) {
                    controller = new BasicOWSController(keys[1], keys[2], keys[3], queueSize);
                } else if (keys.length == 3) {
View Full Code Here

Examples of org.geoserver.flow.controller.GlobalFlowController

        assertTrue(controllers.get(8) instanceof SingleIpFlowController);
        ipMatcher = (IpRequestMatcher) ((SingleIpFlowController) controllers.get(8)).getMatcher();
        assertEquals("192.168.1.10", ipMatcher.getIp());

        assertTrue(controllers.get(9) instanceof GlobalFlowController);
        GlobalFlowController gc = (GlobalFlowController) controllers.get(9);
        assertEquals(100, gc.getPriority());
    }
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.