org.mockserver.mockserver
Class MockServer

java.lang.Object
  extended by org.mockserver.mockserver.MockServer
All Implemented Interfaces:
Stoppable

public class MockServer
extends Object
implements Stoppable

An HTTP server that sends back the content of the received HTTP request in a pretty plaintext form.


Field Summary
static io.netty.util.AttributeKey<LogFilter> LOG_FILTER
           
 
Constructor Summary
MockServer(Integer... requestedPortBindings)
          Start the instance using the port provided
 
Method Summary
 List<Integer> bindToPorts(List<Integer> requestedPortBindings)
           
 int getPort()
           
 List<Integer> getPorts()
           
 boolean isRunning()
           
 void stop()
           
 MockServer withStopEventQueue(StopEventQueue stopEventQueue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_FILTER

public static final io.netty.util.AttributeKey<LogFilter> LOG_FILTER
Constructor Detail

MockServer

public MockServer(Integer... requestedPortBindings)
Start the instance using the port provided

Parameters:
requestedPortBindings - the http port to use
Method Detail

bindToPorts

public List<Integer> bindToPorts(List<Integer> requestedPortBindings)

stop

public void stop()
Specified by:
stop in interface Stoppable

withStopEventQueue

public MockServer withStopEventQueue(StopEventQueue stopEventQueue)

isRunning

public boolean isRunning()

getPorts

public List<Integer> getPorts()

getPort

public int getPort()


Copyright © 2015. All rights reserved.