Package org.geoserver.flow.controller

Examples of org.geoserver.flow.controller.BasicOWSController


        assertTrue(controllers.get(1) instanceof BasicOWSController);
        assertTrue(controllers.get(2) instanceof GlobalFlowController);
       
        UserFlowController uc = (UserFlowController) controllers.get(0);
        assertEquals(6, uc.getPriority());
        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


*
*/
public class BasicOWSFlowControllerTest extends AbstractFlowControllerTest {

    public void testMatchService() {
        BasicOWSController controller = new BasicOWSController("WMS", 1);
        assertFalse(controller.matchesRequest(buildRequest("WFS", "GetFeature", "GML")));
        assertTrue(controller.matchesRequest(buildRequest("WMS", "GetMap", "image/png")));
        assertTrue(controller.matchesRequest(buildRequest("WMS", "GetFeatureInfo", "image/png")));
    }
View Full Code Here

        assertTrue(controller.matchesRequest(buildRequest("WMS", "GetMap", "image/png")));
        assertTrue(controller.matchesRequest(buildRequest("WMS", "GetFeatureInfo", "image/png")));
    }
   
    public void testMatchServiceRequest() {
        BasicOWSController controller = new BasicOWSController("WMS", "GetMap", 1);
        assertFalse(controller.matchesRequest(buildRequest("WFS", "GetFeature", "GML")));
        assertTrue(controller.matchesRequest(buildRequest("WMS", "GETMAP", "image/png")));
        assertFalse(controller.matchesRequest(buildRequest("WMS", "GetFeatureInfo", "image/png")));
    }
View Full Code Here

        assertTrue(controller.matchesRequest(buildRequest("WMS", "GETMAP", "image/png")));
        assertFalse(controller.matchesRequest(buildRequest("WMS", "GetFeatureInfo", "image/png")));
    }
   
    public void testMatchServiceRequestOutputFormat() {
        BasicOWSController controller = new BasicOWSController("WMS", "GetMap", "image/png", 1);
        assertFalse(controller.matchesRequest(buildRequest("WFS", "GetFeature", "GML")));
        assertTrue(controller.matchesRequest(buildRequest("WMS", "GETMAP", "image/png")));
        assertFalse(controller.matchesRequest(buildRequest("WMS", "GETMAP", "application/pdf")));
        assertFalse(controller.matchesRequest(buildRequest("WMS", "GetFeatureInfo", "image/png")));
    }
View Full Code Here

            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) {
                    controller = new BasicOWSController(keys[1], keys[2], queueSize);
                } else if (keys.length == 2) {
                    controller = new BasicOWSController(keys[1], queueSize);
                }
            } else if ("user".equals(keys[0])) {
                controller = new UserFlowController(queueSize);
            }
View Full Code Here

            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) {
                    controller = new BasicOWSController(keys[1], keys[2], queueSize);
                } else if (keys.length == 2) {
                    controller = new BasicOWSController(keys[1], queueSize);
                }
            } else if ("user".equals(keys[0])) {
                if (keys.length == 1) {
                    controller = new UserConcurrentFlowController(queueSize);
                } else if ("ows".equals(keys[1])) {
View Full Code Here

        assertTrue(controllers.get(4) instanceof UserConcurrentFlowController);
        UserConcurrentFlowController uc = (UserConcurrentFlowController) controllers.get(4);
        assertEquals(6, uc.getPriority());

        assertTrue(controllers.get(5) instanceof BasicOWSController);
        BasicOWSController oc = (BasicOWSController) controllers.get(5);
        assertEquals(8, oc.getPriority());
        assertEquals("wms.getmap", oc.getMatcher().toString());

        assertTrue(controllers.get(6) instanceof IpFlowController);
        IpFlowController ipFc = (IpFlowController) controllers.get(6);
        assertEquals(12, ipFc.getPriority());
View Full Code Here

TOP

Related Classes of org.geoserver.flow.controller.BasicOWSController

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.