Package org.geoserver.ows

Examples of org.geoserver.ows.DispatcherCallback


    }
   
    @Test
    public void test() throws Exception {
        final RequestData data = monitor.start();
        DispatcherCallback callback = new DispatcherCallback() {
           
            public Service serviceDispatched(Request request, Service service) throws ServiceException {
                return null;
            }
           
            public Response responseDispatched(Request request, Operation operation, Object result,
                    Response response) {
                return null;
            }
           
            public Object operationExecuted(Request request, Operation operation, Object result) {
                return null;
            }
           
            public Operation operationDispatched(Request request, Operation operation) {
                assertEquals(Status.WAITING, data.getStatus());
                return operation;
            }
           
            public Request init(Request request) {
                return null;
            }
           
            public void finished(Request request) {
            }
        };
       
        ControlFlowCallbackProxy proxy = new ControlFlowCallbackProxy(monitor, callback);
        callback = (DispatcherCallback) Proxy.newProxyInstance(getClass().getClassLoader(),
                new Class[]{DispatcherCallback.class}, proxy);
       
        callback.operationDispatched(new Request(),
            new Operation("foo", new Service("bar", null, null, null), null, null));
       
        assertEquals(Status.RUNNING, data.getStatus());
    }
View Full Code Here


    }
   
    @Test
    public void test() throws Exception {
        final RequestData data = monitor.start();
        DispatcherCallback callback = new DispatcherCallback() {
           
            public Service serviceDispatched(Request request, Service service) throws ServiceException {
                return null;
            }
           
            public Response responseDispatched(Request request, Operation operation, Object result,
                    Response response) {
                return null;
            }
           
            public Object operationExecuted(Request request, Operation operation, Object result) {
                return null;
            }
           
            public Operation operationDispatched(Request request, Operation operation) {
                assertEquals(Status.WAITING, data.getStatus());
                return operation;
            }
           
            public Request init(Request request) {
                return null;
            }
           
            public void finished(Request request) {
            }
        };
       

        callback = createProxy(callback);
        callback.operationDispatched(new Request(),
            new Operation("foo", new Service("bar", null, null, null), null, null));
       
        assertEquals(Status.RUNNING, data.getStatus());
    }
View Full Code Here

       
        assertEquals(Status.RUNNING, data.getStatus());
    }

    public void testGetRunningAndBlockedRequests() throws Exception {
        DispatcherCallback callback = new DispatcherCallback() {

            public long getRunningRequests() {
                return 10;
            }
View Full Code Here

TOP

Related Classes of org.geoserver.ows.DispatcherCallback

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.