public class PayloadWriter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected CompilerFacade |
compilers |
protected Env |
env |
protected java.util.concurrent.ExecutorService |
executorService |
protected Request |
request |
protected Response |
response |
protected Site |
site |
Constructor and Description |
---|
PayloadWriter(Request request,
Response response,
Env env,
Site site,
CompilerFacade compilers,
java.util.concurrent.ExecutorService executorService) |
Modifier and Type | Method and Description |
---|---|
protected void |
close() |
protected java.lang.String |
etag(byte[] data) |
protected byte[] |
forCompiledPath(CompiledPath compiledPath) |
protected byte[] |
forModelAndView(ModelAndView modelAndView) |
protected byte[] |
forPath(java.nio.file.Path path) |
protected byte[] |
forString(java.lang.String value) |
protected byte[] |
forTemplatePath(java.nio.file.Path path) |
protected java.lang.String |
getContentType(java.lang.Object content,
java.lang.String uri) |
protected byte[] |
getData(java.lang.Object content,
java.lang.String uri) |
protected long |
getLastModified(Payload payload) |
protected boolean |
isStream(java.lang.Object content) |
protected boolean |
shouldGzip() |
protected boolean |
shouldIgnoreError(java.io.IOException e) |
protected void |
streamPayload(java.lang.String uri,
Payload payload) |
protected byte[] |
toJson(java.lang.Object content) |
protected void |
write(byte[] data) |
protected void |
write(Payload payload) |
void |
writeAndClose(Payload payload) |
protected void |
writeBufferedReader(Payload payload) |
protected void |
writeBytes(java.lang.String uri,
Payload payload) |
protected void |
writeEventStream(Payload payload) |
protected void |
writeInputStream(Payload payload) |
protected void |
writeStreamingHeaders() |
protected final Request request
protected final Response response
protected final Env env
protected final Site site
protected final CompilerFacade compilers
protected final java.util.concurrent.ExecutorService executorService
public PayloadWriter(Request request, Response response, Env env, Site site, CompilerFacade compilers, java.util.concurrent.ExecutorService executorService)
public void writeAndClose(Payload payload) throws java.io.IOException
java.io.IOException
protected void close()
protected void write(Payload payload) throws java.io.IOException
java.io.IOException
protected void writeBytes(java.lang.String uri, Payload payload) throws java.io.IOException
java.io.IOException
protected void writeStreamingHeaders() throws java.io.IOException
java.io.IOException
protected void streamPayload(java.lang.String uri, Payload payload) throws java.io.IOException
java.io.IOException
protected void writeEventStream(Payload payload) throws java.io.IOException
java.io.IOException
protected void writeBufferedReader(Payload payload) throws java.io.IOException
java.io.IOException
protected void writeInputStream(Payload payload) throws java.io.IOException
java.io.IOException
protected void write(byte[] data) throws java.io.IOException
java.io.IOException
protected boolean shouldGzip()
protected boolean shouldIgnoreError(java.io.IOException e)
protected java.lang.String etag(byte[] data)
protected boolean isStream(java.lang.Object content)
protected java.lang.String getContentType(java.lang.Object content, java.lang.String uri)
protected byte[] getData(java.lang.Object content, java.lang.String uri) throws java.io.IOException
java.io.IOException
protected byte[] toJson(java.lang.Object content)
protected long getLastModified(Payload payload) throws java.io.IOException
java.io.IOException
protected byte[] forString(java.lang.String value)
protected byte[] forModelAndView(ModelAndView modelAndView)
protected byte[] forPath(java.nio.file.Path path) throws java.io.IOException
java.io.IOException
protected byte[] forCompiledPath(CompiledPath compiledPath) throws java.io.IOException
java.io.IOException
protected byte[] forTemplatePath(java.nio.file.Path path)
Copyright © 2014. All Rights Reserved.