Package org.n52.iceland.coding.encode
Class AbstractResponseWriter<T>
- java.lang.Object
-
- org.n52.iceland.coding.encode.AbstractResponseWriter<T>
-
- Type Parameters:
T- generic for the element to write
- All Implemented Interfaces:
ResponseWriter<T>,Component<ResponseWriterKey>,Keyed<ResponseWriterKey>
- Direct Known Subclasses:
EXIResponseWriter,JSONResponseWriter,SoapChainResponseWriter,XmlResponseWriter
public abstract class AbstractResponseWriter<T> extends Object implements ResponseWriter<T>
AbstractResponseWriterclass for response streaming- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description AbstractResponseWriter(EncoderRepository encoderRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaTypegetContentType()Get the current contentTypeMediaTypegetEncodedContentType(ResponseFormat responseFormat)protected <D,S>
Encoder<D,S>getEncoder(EncoderKey key)Getter for encoder, encapsulates the instance callprotected EncoderRepositorygetEncoderRepository()voidsetContentType(MediaType contentType)Set the contentType-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.n52.iceland.coding.encode.ResponseWriter
getForcedHttpStatus, hasForcedHttpStatus, isSetContentType, supportsGZip, write
-
-
-
-
Constructor Detail
-
AbstractResponseWriter
public AbstractResponseWriter(EncoderRepository encoderRepository)
-
-
Method Detail
-
getContentType
public MediaType getContentType()
Description copied from interface:ResponseWriterGet the current contentType- Specified by:
getContentTypein interfaceResponseWriter<T>- Returns:
- the contenType
-
setContentType
public void setContentType(MediaType contentType)
Description copied from interface:ResponseWriterSet the contentType- Specified by:
setContentTypein interfaceResponseWriter<T>- Parameters:
contentType- to set
-
getEncoder
protected <D,S> Encoder<D,S> getEncoder(EncoderKey key)
Getter for encoder, encapsulates the instance call- Type Parameters:
D- the encoders output typeS- the encoders input type- Parameters:
key- Encoder key- Returns:
- Matching encoder
-
getEncodedContentType
public MediaType getEncodedContentType(ResponseFormat responseFormat)
- Specified by:
getEncodedContentTypein interfaceResponseWriter<T>
-
getEncoderRepository
protected EncoderRepository getEncoderRepository()
-
-