public class JettyStubHttpServer extends Object implements StubHttpServer
Constructor and Description |
---|
JettyStubHttpServer() |
JettyStubHttpServer(int port) |
Modifier and Type | Method and Description |
---|---|
int |
getPort() |
void |
registerRequestManager(RequestManager ruleProvider)
Registers a response provider.
|
void |
start()
Starts the underlying http server.
|
void |
stop()
Stops the underlying http server.
|
public JettyStubHttpServer()
public JettyStubHttpServer(int port)
public void registerRequestManager(RequestManager ruleProvider)
StubResponse
instance) for a given http request.registerRequestManager
in interface StubHttpServer
ruleProvider
- response provider to use to retrieve response prescriptions.public void start() throws Exception
StubHttpServerManager
instance.start
in interface StubHttpServer
Exception
- when ugh... something went wrongpublic void stop() throws Exception
stop
in interface StubHttpServer
Exception
- when an error occurred while stopping the serverpublic int getPort()
getPort
in interface StubHttpServer
Copyright © 2016. All Rights Reserved.