this.request = request;
}
public int sendNotification(Notification notification, Client connection,boolean first) throws IOException {
String pathInfo = notification.getPathInfo();
ObservedCall call = notification.getCall();
ServletOutputStream outStream = response.getOutputStream();
outStream.print(first ? "[" : ",");
outStream.print("{\"event\":"+JSON.quote(call.getMethod()) + ",\"source\":" + JSON.quote(prefix + pathInfo));
IndividualRequest request = connection.getIndividualRequest(null, response);
Client.registerThisConnection(request);
request.setRequestedPath(pathInfo, Identification.idForString(pathInfo));
// target = PersevereServlet.handleRange(range, target, since,response);
Object content = call.getContent();
if (content != Undefined.instance) {
outStream.print(",\"result\":");
try{
DataSerializer.serialize(content, this.request.getHeader("Accept"), false);
}