org.apache.wink.client
Class MockHttpServer
java.lang.Object
java.lang.Thread
org.apache.wink.client.MockHttpServer
- All Implemented Interfaces:
- Runnable
public class MockHttpServer
- extends Thread
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
MockHttpServer
public MockHttpServer(int serverPort)
MockHttpServer
public MockHttpServer(int serverPort,
boolean ssl)
startServer
public void startServer()
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
stopServer
public void stopServer()
setReadTimeout
public void setReadTimeout(int milliseconds)
setDelayResponse
public void setDelayResponse(int milliseconds)
getRequestContentAsString
public String getRequestContentAsString()
getRequestContent
public byte[] getRequestContent()
getRequestHeaders
public Map<String,List<String>> getRequestHeaders()
getRequestMethod
public String getRequestMethod()
getRequestUrl
public String getRequestUrl()
main
public static void main(String[] args)
setMockHttpServerResponses
public void setMockHttpServerResponses(MockHttpServer.MockHttpServerResponse... responses)
getMockHttpServerResponses
public List<MockHttpServer.MockHttpServerResponse> getMockHttpServerResponses()
setServerPort
public void setServerPort(int serverPort)
getServerPort
public int getServerPort()
Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.