Examples of AppcastException


Examples of org.jfx4ee.adm4ee.business.appcast.control.AppcastException

    public Appcast fetch(String url) throws AppcastException {
        WebTarget appcastResource = client.target(url);
        Response response = appcastResource.request(MediaType.APPLICATION_XML_TYPE).get(Response.class);
        if (response == null) {
            logger.log(Level.SEVERE, "Could not fetch appcast from URL ''{0}''", url);
            throw new AppcastException("Could not fetch appcast from URL", url, 500, null);
        }
        if (response.getStatus() != Status.OK.getStatusCode()) {
            logger.log(Level.SEVERE, "Could not fetch appcast from URL ''{0}'': {1} {2}", new Object[]{url, response.getStatus(), response.getStatusInfo()});
            throw new AppcastException("Could not fetch appcast from URL", url, response.getStatus(), response.getStatusInfo().getReasonPhrase());
        }
        // Got a valid response
        return response.readEntity(Appcast.class);
    }
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.