public abstract class AbstractClient extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
contextPath |
protected ExpectationSerializer |
expectationSerializer |
protected String |
host |
protected HttpRequestSerializer |
httpRequestSerializer |
protected org.slf4j.Logger |
logger |
protected NettyHttpClient |
nettyHttpClient |
protected int |
port |
protected VerificationSequenceSerializer |
verificationSequenceSerializer |
protected VerificationSerializer |
verificationSerializer |
Modifier | Constructor and Description |
---|---|
protected |
AbstractClient(String host,
int port,
String contextPath)
Start the client communicating to the proxy at the specified host and port
and contextPath for example:
|
Modifier and Type | Method and Description |
---|---|
protected String |
calculatePath(String path) |
String |
contextPath() |
protected String |
formatErrorMessage(String message,
Object... objects) |
InetSocketAddress |
remoteAddress() |
protected HttpResponse |
sendRequest(HttpRequest httpRequest) |
protected final org.slf4j.Logger logger
protected final String host
protected final int port
protected final String contextPath
protected NettyHttpClient nettyHttpClient
protected HttpRequestSerializer httpRequestSerializer
protected ExpectationSerializer expectationSerializer
protected VerificationSerializer verificationSerializer
protected VerificationSequenceSerializer verificationSequenceSerializer
protected AbstractClient(String host, int port, String contextPath)
ProxyClient mockServerClient = new ProxyClient("localhost", 1080, "/proxy");
host
- the host for the proxy to communicate withport
- the port for the proxy to communicate withcontextPath
- the context path that the proxy war is deployed toprotected HttpResponse sendRequest(HttpRequest httpRequest)
public InetSocketAddress remoteAddress()
public String contextPath()
Copyright © 2018. All rights reserved.