logger.debug("Received HTTP GET request at '{}' for media type '{}'.", new String[] { uriInfo.getPath(), type });
if(atmosphereTransport==null || atmosphereTransport.isEmpty()) {
String responseType = MediaTypeHelper.getResponseMediaType(headers.getAcceptableMediaTypes(), type);
if(responseType!=null) {
Object responseObject = responseType.equals(MediaTypeHelper.APPLICATION_X_JAVASCRIPT) ?
new JSONWithPadding(getPageBean(sitemapname, pageId, uriInfo.getBaseUriBuilder().build()), callback) : getPageBean(sitemapname, pageId, uriInfo.getBaseUriBuilder().build());
throw new WebApplicationException(Response.ok(responseObject, responseType).header(ATMOS_TIMEOUT_HEADER, DEFAULT_TIMEOUT_SECS + "").build());
} else {
throw new WebApplicationException(Response.notAcceptable(null).build());
}
}