Package org.n52.iceland.coding.encode
Interface ResponseWriter<T>
-
- Type Parameters:
T- the entity type
- All Superinterfaces:
Component<ResponseWriterKey>,Keyed<ResponseWriterKey>
- All Known Implementing Classes:
AbstractResponseWriter,EXIResponseWriter,JSONResponseWriter,SoapChainResponseWriter,XmlResponseWriter
public interface ResponseWriter<T> extends Component<ResponseWriterKey>
TODO JavaDoc- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description MediaTypegetContentType()Get the current contentTypedefault MediaTypegetEncodedContentType(ResponseFormat responseFormat)default HTTPStatusgetForcedHttpStatus(T t)default booleanhasForcedHttpStatus(T t)default booleanisSetContentType()Check if contentType is setvoidsetContentType(MediaType contentType)Set the contentTypebooleansupportsGZip(T t)Check if GZip is supported by this writervoidwrite(T t, OutputStream out, ResponseProxy responseProxy)Write object t toOutputStreamout
-
-
-
Method Detail
-
getContentType
MediaType getContentType()
Get the current contentType- Returns:
- the contenType
-
setContentType
void setContentType(MediaType contentType)
Set the contentType- Parameters:
contentType- to set
-
isSetContentType
default boolean isSetContentType()
Check if contentType is set- Returns:
true, if contentType is set
-
write
void write(T t, OutputStream out, ResponseProxy responseProxy) throws IOException, EncodingException
Write object t toOutputStreamout- Parameters:
t- Object to writeout-OutputStreamto be written toresponseProxy-ResponseProxygiving access to header and content length setters- Throws:
IOException- If an error occurs during writingEncodingException- if an errors occurs during encoding
-
supportsGZip
boolean supportsGZip(T t)
Check if GZip is supported by this writer- Parameters:
t- Object to write- Returns:
true, if GZip is supported
-
getEncodedContentType
default MediaType getEncodedContentType(ResponseFormat responseFormat)
-
hasForcedHttpStatus
default boolean hasForcedHttpStatus(T t)
-
getForcedHttpStatus
default HTTPStatus getForcedHttpStatus(T t)
-
-