com.github.dreamhead.moco
Class HttpServer

java.lang.Object
  extended by com.github.dreamhead.moco.ResponseSetting
      extended by com.github.dreamhead.moco.HttpServer
Direct Known Subclasses:
ActualHttpServer

public abstract class HttpServer
extends ResponseSetting


Field Summary
 
Fields inherited from class com.github.dreamhead.moco.ResponseSetting
eventTriggers, handler
 
Constructor Summary
HttpServer()
           
 
Method Summary
 Setting delete(RequestMatcher matcher)
           
 Setting get(RequestMatcher matcher)
           
 ResponseSetting mount(java.lang.String dir, MountTo target, MountPredicate... predicates)
           
protected abstract  Setting onRequestAttached(RequestMatcher matcher)
           
abstract  int port()
           
 Setting post(RequestMatcher matcher)
           
 Setting put(RequestMatcher matcher)
           
 Setting request(RequestMatcher... matchers)
           
 Setting request(RequestMatcher matcher)
           
 
Methods inherited from class com.github.dreamhead.moco.ResponseSetting
context, on, redirectTo, response, response, response, response, response
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpServer

public HttpServer()
Method Detail

port

public abstract int port()

onRequestAttached

protected abstract Setting onRequestAttached(RequestMatcher matcher)

request

public Setting request(RequestMatcher matcher)

request

public Setting request(RequestMatcher... matchers)

get

public Setting get(RequestMatcher matcher)

post

public Setting post(RequestMatcher matcher)

put

public Setting put(RequestMatcher matcher)

delete

public Setting delete(RequestMatcher matcher)

mount

public ResponseSetting mount(java.lang.String dir,
                             MountTo target,
                             MountPredicate... predicates)