Package org.geowebcache.conveyor

Examples of org.geowebcache.conveyor.ConveyorTile


        long[][] tiles;
        int tileW;
        int tileH;
        String format;
        if (tileRespRecv instanceof ConveyorTile) {
            ConveyorTile conveyorTile = (ConveyorTile) tileRespRecv;
            long[] tileIndex = conveyorTile.getTileIndex();
            tiles = new long[1][1];
            tiles[0] = tileIndex;
            format = conveyorTile.getMimeType().getInternalName().toUpperCase();
            tileW = conveyorTile.getGridSubset().getTileWidth();
            tileH = conveyorTile.getGridSubset().getTileHeight();
        } else {
            WMSMetaTile metaTile = (WMSMetaTile) tileRespRecv;
            tiles = metaTile.getTilesGridPositions();
            format = metaTile.getResponseFormat().getInternalName().toUpperCase();
            GridSubset gridSubset = layer.getGridSubset(layer.getGridSubsets().iterator().next());
View Full Code Here


            mimeType = MimeType.createFromFormat(strFormat);
        } catch (MimeException me) {
            throw new ServiceException("Unable to determine requested format, " + strFormat);
        }

        ConveyorTile ret = new ConveyorTile(sb, layerId, gsb.WORLD_EPSG3857.getName(), gridLoc,
                mimeType, filteringParameters, request, response);

        if (strCached != null && !Boolean.parseBoolean(strCached)) {
            ret.setRequestHandler(ConveyorTile.RequestHandler.SERVICE);

            if (strMetaTiled != null && !Boolean.parseBoolean(strMetaTiled)) {
                ret.setHint("not_cached,not_metatiled");
            } else {
                ret.setHint("not_cached");
            }
        }

        return ret;
    }
View Full Code Here

        request.setupAddParameter("y", "0");

        GMapsConverter converter = new GMapsConverter(sb, tld, gsb);

        try {
            ConveyorTile conveyorTile = converter.getConveyor(request, response);
            Map<String, String> parameters = conveyorTile.getParameters();
            assertNotNull(parameters);
            // assertTrue(parameters.contains(URLEncoder.encode(CQL_FILTER_PARAMETER_VALUE,"UTF8")));
            assertEquals(CQL_FILTER_PARAMETER_VALUE,
                    URLDecoder.decode(parameters.get(CQL_FILTER_PARAMETER_NAME), "UTF8"));
        } catch (ServiceException e) {
View Full Code Here

            mimeType = MimeType.createFromFormat(strFormat);
        } catch (MimeException me) {
            throw new ServiceException("Unable to determine requested format, "+ strFormat);
        }
       
        ConveyorTile ret = new ConveyorTile(sb, layerId, gsb.WORLD_EPSG3857.getName(), gridLoc, mimeType, null, request, response);
       
        if(strCached != null && ! Boolean.parseBoolean(strCached)) {
            ret.setRequestHandler(ConveyorTile.RequestHandler.SERVICE);
            if(strMetaTiled != null && ! Boolean.parseBoolean(strMetaTiled)) {
                ret.setHint("not_cached,not_metatiled");
            } else {
                ret.setHint("not_cached");
            }
        }
       
        return ret;
    }
View Full Code Here

            } catch (MimeException me) {
                throw new ServiceException("Unable to determined requested format, " + strFormat);
            }
        }
       
        ConveyorTile ret = new ConveyorTile(sb, layerId, gsb.WORLD_EPSG3857.getName(), gridLoc, mimeType, null, request, response);
       
        if(strCached != null && ! Boolean.parseBoolean(strCached)) {
            ret.setRequestHandler(ConveyorTile.RequestHandler.SERVICE);
            if(strMetaTiled != null && ! Boolean.parseBoolean(strMetaTiled)) {
                ret.setHint("not_cached,not_metatiled");
            } else {
                ret.setHint("not_cached");
            }
        }
       
        return ret;
    }
View Full Code Here

        final String layerName = conv.getLayerId();
        assertEquals("mockLayer", layerName);
       
        assertThat(conv, instanceOf(ConveyorTile.class));
       
        ConveyorTile tile = (ConveyorTile) conv;
       
        Map<String,String> parameters = tile.getParameters();
        assertThat(parameters, hasEntry("STYLES", "Bar")); // Changed to plural, as used by WMS.
    }
View Full Code Here

        long[] gridLoc = { 0, 0, 0 };// x, y, level
        MimeType mimeType = layer.getMimeTypes().get(0);
        GridSet gridSet = gridSetBroker.WORLD_EPSG4326;
        String gridSetId = gridSet.getName();
        ConveyorTile tile = new ConveyorTile(mockStorageBroker, layerId, gridSetId, gridLoc,
                mimeType, null, servletReq, servletResp);

        boolean tryCache = false;
        layer.seedTile(tile, tryCache);
View Full Code Here

        long[] gridLoc = { 0, 0, 0 };// x, y, level
        MimeType mimeType = layer.getMimeTypes().get(0);
        GridSet gridSet = gridSetBroker.WORLD_EPSG4326;
        String gridSetId = gridSet.getName();
        ConveyorTile tile = new ConveyorTile(mockStorageBroker, layerId, gridSetId, gridLoc,
                mimeType, null, servletReq, servletResp);
       
        // proxy the request, and check the response
        layer.proxyRequest(tile);
       
View Full Code Here

        // this number is determined by our tileRange minus those out of bounds
        assertEquals(880, tiles.size());
        // tiles at zoom 4 and 7 will have non png data
        for (int i = 0; i < tiles.size(); i++) {
            ConveyorTile tile = tiles.get(i);
            assertNotNull(tile.getBlob());
            //System.out.println(tile.getTileIndex()[2] + " " + tile.getBlob().getSize());
        }
       
        // empirical numbers
        // this number is determined by the number of metarequests at level 5+6
View Full Code Here

        long[] gridLoc = trIter.nextMetaGridLocation(new long[3]);

        while (gridLoc != null) {
            Map<String, String> fullParameters = tr.getParameters();

            final ConveyorTile tile = new ConveyorTile(storageBroker, layerName, tr.getGridSetId(), gridLoc,
                    tr.getMimeType(), fullParameters, null, null);
            tile.setTileLayer(tl);
           
            tl.seedTile(tile, false);

            gridLoc = trIter.nextMetaGridLocation(gridLoc);
        }
View Full Code Here

TOP

Related Classes of org.geowebcache.conveyor.ConveyorTile

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.