Examples of parseResponse()


Examples of ch.ethz.inf.vs.californium.network.serialization.DataParser.parseResponse()

          }
        }
       
      } else if (parser.isResponse()) {
        // This is a response
        Response response = parser.parseResponse();
        response.setSource(raw.getAddress());
        response.setSourcePort(raw.getPort());

        /*
         * Logging here causes significant performance loss.
View Full Code Here

Examples of com.box.restclientv2.responses.DefaultBoxResponse.parseResponse()

        AuthFatalFailureException {
        request.setAuth(getAuth());
        DefaultBoxResponse response = (DefaultBoxResponse) getRestClient().execute(request);
        BoxObjectResponseParser parser = new BoxObjectResponseParser(getResourceHub().getClass(type), objectMapper);
        ErrorResponseParser errorParser = new ErrorResponseParser(getObjectMapper());
        return response.parseResponse(parser, errorParser);
    }

    // TODO: support web links
    /**
     * Try to cast a box item into a concrete class(i.e. file or folder)
View Full Code Here

Examples of com.box.restclientv2.responses.DefaultBoxResponse.parseResponse()

        DownloadFileRequest request = new DownloadFileRequest(mConfig, objectMapper, mFileId, requestObject);
        request.setAuth(auth);
        DefaultBoxResponse response = (DefaultBoxResponse) mRestClient.execute(request);
        DefaultFileResponseParser parser = new DefaultFileResponseParser();
        ErrorResponseParser errorParser = new ErrorResponseParser(objectMapper);
        Object result = response.parseResponse(parser, errorParser);
        if (result instanceof BoxServerError) {
            throw new BoxServerException((BoxServerError) result);
        }
        return (InputStream) result;
    }
View Full Code Here

Examples of com.box.restclientv2.responses.DefaultBoxResponse.parseResponse()

        PreviewRequest request = new PreviewRequest(getConfig(), getObjectMapper(), fileId, extension, requestObject);
        request.setAuth(getAuth());
        DefaultBoxResponse response = (DefaultBoxResponse) getRestClient().execute(request);
        PreviewResponseParser parser = new PreviewResponseParser();
        ErrorResponseParser errorParser = new ErrorResponseParser(getObjectMapper());
        Object result = response.parseResponse(parser, errorParser);

        return (BoxPreview) tryCastObject(BoxResourceType.PREVIEW, result);
    }

    /**
 
View Full Code Here

Examples of com.box.restclientv2.responses.DefaultBoxResponse.parseResponse()

        AuthFatalFailureException {
        request.setAuth(getAuth());
        DefaultBoxResponse response = (DefaultBoxResponse) getRestClient().execute(request);
        BoxObjectResponseParser responseParser = new BoxObjectResponseParser(getClassFromType(type), parser);
        ErrorResponseParser errorParser = new ErrorResponseParser(getJSONParser());
        return response.parseResponse(responseParser, errorParser);
    }

    /**
     * Try to cast an object into a specific class.
     */
 
View Full Code Here

Examples of com.box.restclientv2.responses.DefaultBoxResponse.parseResponse()

        GetPreviewRequest request = new GetPreviewRequest(getConfig(), getJSONParser(), fileId, extension, requestObject);
        request.setAuth(getAuth());
        DefaultBoxResponse response = (DefaultBoxResponse) getRestClient().execute(request);
        PreviewResponseParser parser = new PreviewResponseParser();
        ErrorResponseParser errorParser = new ErrorResponseParser(getJSONParser());
        Object result = response.parseResponse(parser, errorParser);

        return (BoxPreview) tryCastObject(BoxResourceType.PREVIEW, result);
    }

    @Override
View Full Code Here

Examples of com.box.restclientv2.responses.DefaultBoxResponse.parseResponse()

        ThumbnailRequest request = new ThumbnailRequest(getConfig(), getJSONParser(), fileId, extension, requestObject);
        request.setAuth(getAuth());
        DefaultBoxResponse response = (DefaultBoxResponse) getRestClient().execute(request);
        ThumbnailResponseParser parser = new ThumbnailResponseParser();
        ErrorResponseParser errorParser = new ErrorResponseParser(getJSONParser());
        Object result = response.parseResponse(parser, errorParser);
        return (BoxThumbnail) tryCastObject(BoxResourceType.THUMBNAIL, result);
    }

    @Override
    @Deprecated
View Full Code Here

Examples of com.box.restclientv2.responses.DefaultBoxResponse.parseResponse()

        }
        request.setAuth(auth);
        DefaultBoxResponse response = (DefaultBoxResponse) mRestClient.execute(request);
        DefaultFileResponseParser responseParser = new DefaultFileResponseParser();
        ErrorResponseParser errorParser = new ErrorResponseParser(parser);
        Object result = response.parseResponse(responseParser, errorParser);
        if (result instanceof BoxServerError) {
            throw new BoxServerException((BoxServerError) result);
        }
        return (InputStream) result;
    }
View Full Code Here

Examples of eu.planets_project.pp.plato.services.characterisation.xcl.ComparatorUtils.parseResponse()

    private Measurements extractMeasurements(String cprFile, List<MeasurableProperty> properties) {
        Measurements result = new Measurements();
        try {
            ComparatorUtils compUtils = new ComparatorUtils();
            List<CompareResult> compResult = compUtils.parseResponse(cprFile);
            if (compResult.size() == 1) {
                /* we compare two xcdl files, which correspond to one compSet */
                for(MeasurableProperty p : properties) {
                    /*
                     * get all values for measureable properties that correspond to xcl properties:
View Full Code Here

Examples of org.apache.myfaces.renderkit.html.util.AddResource.parseResponse()

               
                // only parse HTML responses
                if (contentType != null && isValidContentType(contentType))
                {
                    String oldResponse = extensionsResponseWrapper.toString();
                    addResource.parseResponse(servletRequest, extensionsResponseWrapper.toString(),
                            servletResponse);

                    addResource.writeMyFacesJavascriptBeforeBodyEnd(servletRequest,
                            servletResponse);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.