} else {
logger.info("Received HTTP GET request at '{}' for the unknown item '{}'.", uriInfo.getPath(), itemname);
throw new WebApplicationException(404);
}
}
GeneralBroadcaster itemBroadcaster = (GeneralBroadcaster) BroadcasterFactory.getDefault().lookup(GeneralBroadcaster.class, resource.getRequest().getPathInfo(), true);
itemBroadcaster.addStateChangeListener(new ItemStateChangeListener());
return new SuspendResponse.SuspendResponseBuilder<String>()
.scope(SCOPE.REQUEST)
.resumeOnBroadcast(!ResponseTypeHelper.isStreamingTransport(resource.getRequest()))
.broadcaster(itemBroadcaster)
.outputComments(true).build();