com.github.dreamhead.moco.mount
Class MountHandler

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.mount.MountHandler
All Implemented Interfaces:
ConfigApplier<ResponseHandler>, ResponseHandler

public class MountHandler
extends AbstractContentResponseHandler


Constructor Summary
MountHandler(java.io.File dir, MountTo target)
           
 
Method Summary
 ResponseHandler apply(MocoConfig config)
           
protected  java.lang.String getContentType(io.netty.handler.codec.http.FullHttpRequest request)
           
protected  void writeContentResponse(io.netty.handler.codec.http.FullHttpRequest 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

MountHandler

public MountHandler(java.io.File dir,
                    MountTo target)
Method Detail

writeContentResponse

protected void writeContentResponse(io.netty.handler.codec.http.FullHttpRequest request,
                                    io.netty.buffer.ByteBuf buffer)
Specified by:
writeContentResponse in class AbstractContentResponseHandler

getContentType

protected java.lang.String getContentType(io.netty.handler.codec.http.FullHttpRequest request)
Overrides:
getContentType in class AbstractContentResponseHandler

apply

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