public class StackTraceResponseContext
extends org.apache.abdera.protocol.server.context.SimpleResponseContext
SimpleResponseContext
in Abdera. This is used for outputting
exceptions along with stack traces.encoding
binary, EMPTY, headers, status, status_text, writer
Constructor and Description |
---|
StackTraceResponseContext(Exception e)
Creates a response that can contain a stack trace.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasEntity()
Whether the response contains an entity.
|
static void |
setEmitStackTraces(boolean emitStackTraces)
Method to set whether stack traces must be emitted.
|
protected void |
writeEntity(Writer writer)
Write either the full stack trace or just the Exception message, depending on config
|
getEncoding, setEncoding, writeTo, writeTo, writeTo, writeTo
addEncodedHeader, addEncodedHeaders, addHeader, addHeaders, getCacheControl, getDateHeader, getHeader, getHeaderNames, getHeaders, getHeaders, getStatus, getStatusText, isBinary, removeHeader, setAge, setAllow, setAllow, setBinary, setContentLanguage, setContentLength, setContentLocation, setContentType, setContentType, setEncodedHeader, setEncodedHeader, setEntityTag, setEntityTag, setEscapedHeader, setExpires, setHeader, setHeader, setLastModified, setLocation, setSlug, setStatus, setStatusText, setWriter
getAge, getAllow, getContentLength, getEntityTag, getExpires, getLastModified, getLocation, getNoCacheHeaders, getPrivateHeaders, getSMaxAge, getType, isMustRevalidate, isPrivate, isProxyRevalidate, isPublic, setMaxAge, setMustRevalidate, setNoCache, setNoCacheHeaders, setNoStore, setNoTransform, setPrivate, setPrivateHeaders, setProxyRevalidate, setPublic
check, getContentLanguage, getContentLocation, getContentType, getDecodedHeader, getDecodedHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransform, toggle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public StackTraceResponseContext(Exception e)
e
- the exception.public static void setEmitStackTraces(boolean emitStackTraces)
emitStackTraces
- whether stack traces must be emitted.protected void writeEntity(Writer writer) throws IOException
writeEntity
in class org.apache.abdera.protocol.server.context.SimpleResponseContext
writer
- the Writer connected to the HTTP responseIOException
- if an error occurred.public boolean hasEntity()
Copyright © 2015 WSO2 Inc. All Rights Reserved.