com.github.dreamhead.moco.handler
Class ContentHandler

java.lang.Object
  extended by com.github.dreamhead.moco.handler.AbstractResponseHandler
      extended by com.github.dreamhead.moco.handler.AbstractContentResponseHandler
          extended by com.github.dreamhead.moco.handler.ContentHandler
All Implemented Interfaces:
ConfigApplier<ResponseHandler>, ResponseHandler

public class ContentHandler
extends AbstractContentResponseHandler


Constructor Summary
ContentHandler(ContentResource resource)
           
 
Method Summary
 ResponseHandler apply(MocoConfig config)
           
protected  java.lang.String getContentType(HttpRequest request)
           
protected  void writeContentResponse(HttpRequest request, io.netty.buffer.ByteBuf buffer)
           
 
Methods inherited from class com.github.dreamhead.moco.handler.AbstractContentResponseHandler
writeToResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentHandler

public ContentHandler(ContentResource resource)
Method Detail

writeContentResponse

protected void writeContentResponse(HttpRequest request,
                                    io.netty.buffer.ByteBuf buffer)
Specified by:
writeContentResponse in class AbstractContentResponseHandler

getContentType

protected java.lang.String getContentType(HttpRequest request)
Overrides:
getContentType in class AbstractContentResponseHandler

apply

public ResponseHandler apply(MocoConfig config)
Specified by:
apply in interface ConfigApplier<ResponseHandler>
Overrides:
apply in class AbstractResponseHandler