Method Summary |
|
public void | expectMethod(String theMethod) Advise the server to expect a specific HTTP method in requests. |
public void | expectRequestCount(int theRequestCount) Advise the server to expect a specific number of requests. |
public void | expectUri(String theUri) Advise the server to expect a specific request URI in requests. |
public static int | findUnusedLocalPort(String theHost, int theLowest, int theHighest) Returns a free port number on the specified host within the given range. |
public int | getPort() Returns the port number the server is listening on. |
public boolean | isStopped() Returns whether the server is stopped (or about to stop, to be precise). |
public void | run() The main server thread. |
public void | setResponse(String theResponse) Sets the content of the request to send back on any request. |
public void | stop() Stops the server. |
public void | verify() Verifies whether the requests sent to the server matched those expected. |