org.mockserver.client
Class AbstractClient

java.lang.Object
  extended by org.mockserver.client.AbstractClient
Direct Known Subclasses:
MockServerClient, ProxyClient

public abstract class AbstractClient
extends Object

Author:
jamesdbloom

Field Summary
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
           
 
Constructor Summary
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: ProxyClient mockServerClient = new ProxyClient("localhost", 1080, "/proxy");
 
Method Summary
protected  String calculatePath(String path)
           
protected  String formatErrorMessage(String message, Object... objects)
           
protected  HttpResponse sendRequest(HttpRequest httpRequest)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.slf4j.Logger logger

host

protected final String host

port

protected final int port

contextPath

protected final String contextPath

nettyHttpClient

protected NettyHttpClient nettyHttpClient

httpRequestSerializer

protected HttpRequestSerializer httpRequestSerializer

expectationSerializer

protected ExpectationSerializer expectationSerializer

verificationSerializer

protected VerificationSerializer verificationSerializer

verificationSequenceSerializer

protected VerificationSequenceSerializer verificationSequenceSerializer
Constructor Detail

AbstractClient

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: ProxyClient mockServerClient = new ProxyClient("localhost", 1080, "/proxy");

Parameters:
host - the host for the proxy to communicate with
port - the port for the proxy to communicate with
contextPath - the context path that the proxy war is deployed to
Method Detail

calculatePath

protected String calculatePath(String path)

sendRequest

protected HttpResponse sendRequest(HttpRequest httpRequest)

formatErrorMessage

protected String formatErrorMessage(String message,
                                    Object... objects)


Copyright © 2015. All rights reserved.