Package org.jfx4ee.adm4ee.business.appcast.control

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

Related Classes of org.jfx4ee.adm4ee.business.appcast.control.AppcastException

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.