Package org.geoserver.monitor

Examples of org.geoserver.monitor.RequestData


       
        Iterator<RequestData> it = monitor.getDAO().getRequests().iterator();
        while((line = in.readLine()) != null) {
            assertTrue(it.hasNext());
           
            RequestData data = it.next();
            String expected = data.getId() + "," + data.getPath() + "," +
                DateUtil.serializeDateTime(data.getStartTime());
            assertEquals(expected, line);
        }
       
        assertFalse(it.hasNext());
    }
View Full Code Here


      
        while(rows.hasNext()) {
            row = rows.next();
           
            assertTrue(it.hasNext());
            RequestData data = it.next();
           
            assertEquals((double) data.getId(), row.getCell(0).getNumericCellValue(), 0.1);
            assertEquals(data.getPath(), row.getCell(1).getStringCellValue());
            assertEquals(data.getStartTime(), row.getCell(2).getDateCellValue());
        }
       
        assertFalse(it.hasNext());
    }
View Full Code Here

        RequestResource.ZIPFormat zip = new RequestResource.ZIPFormat(
            Arrays.asList("id", "path", "startTime", "Error", "Body"), csv, monitor);
       
        Date startTime  = new Date();
        Throwable throwable = new Throwable();
        RequestData data = new RequestData();
        data.setId(12345);
        data.setPath("/foo");
        data.setStartTime(startTime);
       
        data.setBody("<foo></foo>".getBytes());
        data.setError(throwable);
       
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        zip.toRepresentation(data).write(out);
       
        ZipInputStream zin = new ZipInputStream(new ByteArrayInputStream(out.toByteArray()));
View Full Code Here

       
        Iterator<RequestData> it = monitor.getDAO().getRequests().iterator();
        while((line = in.readLine()) != null) {
            assertTrue(it.hasNext());
           
            RequestData data = it.next();
            String expected = data.getId() + "," + data.getPath() + "," +
                DateUtil.serializeDateTime(data.getStartTime());
            assertEquals(expected, line);
        }
       
        assertFalse(it.hasNext());
    }
View Full Code Here

        req.getAttributes().put("request", 2);
       
        Response res = new Response(req);
       
        resource.init(null, req, res);
        RequestData data = (RequestData) resource.handleObjectGet();
        assertEquals("/two", data.getPath());
    }
View Full Code Here

TOP

Related Classes of org.geoserver.monitor.RequestData

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.