org.apache.wink.client
Class MockHttpServer

java.lang.Object
  extended by java.lang.Thread
      extended by org.apache.wink.client.MockHttpServer
All Implemented Interfaces:
java.lang.Runnable

public class MockHttpServer
extends java.lang.Thread


Nested Class Summary
static class MockHttpServer.MockHttpServerResponse
           
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MockHttpServer(int serverPort)
           
MockHttpServer(int serverPort, boolean ssl)
           
 
Method Summary
 java.util.List<MockHttpServer.MockHttpServerResponse> getMockHttpServerResponses()
           
 byte[] getRequestContent()
           
 java.lang.String getRequestContentAsString()
           
 java.util.Map<java.lang.String,java.util.List<java.lang.String>> getRequestHeaders()
           
 java.lang.String getRequestMethod()
           
 java.lang.String getRequestUrl()
           
 int getServerPort()
           
static void main(java.lang.String[] args)
           
 void run()
           
 void setDelayResponse(int milliseconds)
           
 void setMockHttpServerResponses(MockHttpServer.MockHttpServerResponse... responses)
           
 void setReadTimeout(int milliseconds)
           
 void setServerPort(int serverPort)
           
 void startServer()
           
 void stopServer()
           
 
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MockHttpServer

public MockHttpServer(int serverPort)

MockHttpServer

public MockHttpServer(int serverPort,
                      boolean ssl)
Method Detail

startServer

public void startServer()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

stopServer

public void stopServer()

setReadTimeout

public void setReadTimeout(int milliseconds)

setDelayResponse

public void setDelayResponse(int milliseconds)

getRequestContentAsString

public java.lang.String getRequestContentAsString()

getRequestContent

public byte[] getRequestContent()

getRequestHeaders

public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getRequestHeaders()

getRequestMethod

public java.lang.String getRequestMethod()

getRequestUrl

public java.lang.String getRequestUrl()

main

public static void main(java.lang.String[] args)

setMockHttpServerResponses

public void setMockHttpServerResponses(MockHttpServer.MockHttpServerResponse... responses)

getMockHttpServerResponses

public java.util.List<MockHttpServer.MockHttpServerResponse> getMockHttpServerResponses()

setServerPort

public void setServerPort(int serverPort)

getServerPort

public int getServerPort()


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.