Package org.geoserver.ows

Examples of org.geoserver.ows.Response


        // prepare the fake operation we're providing to the source output format
        final Operation sourceOperation = buildSourceOperation(operation, info);

        // lookup the operation we are going to use
        final Response sourceResponse = findSourceResponse(sourceOperation, info);
        if (sourceResponse == null) {
            throw new WFSException(
                    "Could not locate a response that can generate the desired source format '"
                            + info.getSourceFormat() + "' for transformation '" + info.getName() + "'");

        }

        // prepare the stream connections, so that we can do the transformation on the fly
        PipedInputStream pis = new PipedInputStream();
        final PipedOutputStream pos = new PipedOutputStream(pis);

        // submit the source output format execution, tracking exceptions
        Future<Void> future = executor.submit(new Callable<Void>() {

            @Override
            public Void call() throws Exception {
                try {
                    sourceResponse.write(featureCollection, pos, sourceOperation);
                } finally {
                    // close the stream to make sure the transformation won't keep on waiting
                    pos.close();
                }
View Full Code Here


    @SuppressWarnings("unchecked")
    public Response getResponseEncoder(MimeType responseFormat, RenderedImageMap metaTileMap) {
        final String format = responseFormat.getFormat();
        final String mimeType = responseFormat.getMimeType();

        Response response = cachedTileEncoders.get(format);
        if (response == null) {
            final Operation operation;
            {
                GetMapRequest getMap = new GetMapRequest();
                getMap.setFormat(mimeType);
View Full Code Here

                    + metaTileMap.getClass().getName());
        }
        final RenderedImageMapResponse mapEncoder;
        {
            final GWC mediator = GWC.get();
            final Response responseEncoder = mediator.getResponseEncoder(responseFormat,
                    metaTileMap);
            mapEncoder = (RenderedImageMapResponse) responseEncoder;
        }

        RenderedImage tile = metaTileMap.getImage();
View Full Code Here

TOP

Related Classes of org.geoserver.ows.Response

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.