All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.terracotta.management.resource.services.events.TerracottaEventOutput Maven / Gradle / Ivy

Go to download

Ehcache is an open source, standards-based cache used to boost performance, offload the database and simplify scalability. Ehcache is robust, proven and full-featured and this has made it the most widely-used Java-based cache.

There is a newer version: 2.10.9.2
Show newest version
package org.terracotta.management.resource.services.events;

import org.glassfish.jersey.media.sse.OutboundEvent;
import org.glassfish.jersey.server.ChunkedOutput;
import java.nio.charset.Charset;
/**
 * This class exists to overcome an defect seen in Chrome where the Jersey EventOutput uses "\n\n" as the
 * chunkDelimeter. The symptom would be a net::ERR_INVALID_CHUNKED_ENCODING on the Javascript EventSource receiving a
 * Server-Sent Event and that event would be malformed.
 * 
 * @author gkeim
 */
public class TerracottaEventOutput extends ChunkedOutput {
  public TerracottaEventOutput() {
    super("\n\n".getBytes(Charset.forName("UTF-8")));
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy