nl.surfnet.coin.mock
Class MockHandler
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AggregateLifeCycle
org.eclipse.jetty.server.handler.AbstractHandler
nl.surfnet.coin.mock.MockHandler
- All Implemented Interfaces:
- org.eclipse.jetty.server.Handler, org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.LifeCycle
public class MockHandler
- extends org.eclipse.jetty.server.handler.AbstractHandler
MockHandler is a very simple AbstractHandler that returns
content based on the configuration in the test classes. This class is NOT
thread safe.
- Author:
- oharsta
| Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener |
| Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle |
org.eclipse.jetty.util.component.LifeCycle.Listener |
| Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING |
|
Constructor Summary |
MockHandler(org.eclipse.jetty.server.Server server)
Constructor |
|
Method Summary |
protected InputStream |
getResponseInputStream(String requestURI)
Return the result of next call |
void |
handle(String target,
org.eclipse.jetty.server.Request baseRequest,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
setResponseResource(org.springframework.core.io.Resource responseResource)
Set the Resource which contents will be returned as a SOAP response on the
next call |
void |
setResponseResource(org.springframework.core.io.Resource[] responseResource)
|
void |
setStatus(int status)
|
| Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandler |
destroy, doStart, doStop, dumpThis, getServer, setServer |
| Methods inherited from class org.eclipse.jetty.util.component.AggregateLifeCycle |
addBean, dump, dump, dump, dump, dump, dumpStdErr, getBean, getBeans, getBeans, removeBean, removeBeans |
| Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toString |
| Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle |
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
MockHandler
public MockHandler(org.eclipse.jetty.server.Server server)
- Constructor
- Parameters:
server - the Server
getResponseInputStream
protected InputStream getResponseInputStream(String requestURI)
throws IOException
- Return the result of next call
- Throws:
IOException
setResponseResource
public void setResponseResource(org.springframework.core.io.Resource responseResource)
- Set the Resource which contents will be returned as a SOAP response on the
next call
- Parameters:
responseResource - the responseResource
setResponseResource
public void setResponseResource(org.springframework.core.io.Resource[] responseResource)
- Parameters:
responseResource -
handle
public void handle(String target,
org.eclipse.jetty.server.Request baseRequest,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
setStatus
public void setStatus(int status)
- Parameters:
status -
Copyright © 2012. All Rights Reserved.