org.mockserver.model
Class HttpForward

java.lang.Object
  extended by org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
      extended by org.mockserver.model.ObjectWithJsonToString
          extended by org.mockserver.model.Action
              extended by org.mockserver.model.HttpForward

public class HttpForward
extends Action

Author:
jamesdbloom

Nested Class Summary
static class HttpForward.Scheme
           
 
Nested classes/interfaces inherited from class org.mockserver.model.Action
Action.Type
 
Field Summary
 
Fields inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
logger
 
Constructor Summary
HttpForward()
           
 
Method Summary
static HttpForward forward()
          Static builder to create a callback.
 String getHost()
           
 Integer getPort()
           
 HttpForward.Scheme getScheme()
           
 Action.Type getType()
           
 HttpForward withHost(String host)
          The host or ip address to forward the request to i.e.
 HttpForward withPort(Integer port)
          The port to forward the request to i.e.
 HttpForward withScheme(HttpForward.Scheme scheme)
          The scheme to use when forwarded the request, either HTTP or HTTPS.
 
Methods inherited from class org.mockserver.model.ObjectWithJsonToString
toString
 
Methods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
addFieldsExcludedFromEqualsAndHashCode, equals, fieldsExcludedFromEqualsAndHashCode, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpForward

public HttpForward()
Method Detail

forward

public static HttpForward forward()
Static builder to create a callback.


getType

public Action.Type getType()
Specified by:
getType in class Action

getHost

public String getHost()

withHost

public HttpForward withHost(String host)
The host or ip address to forward the request to i.e. "www.mock-server.com"

Parameters:
host - a hostname or ip address as a string

getPort

public Integer getPort()

withPort

public HttpForward withPort(Integer port)
The port to forward the request to i.e. 80. If not specified the port defaults to 80.

Parameters:
port - a port as an integer

getScheme

public HttpForward.Scheme getScheme()

withScheme

public HttpForward withScheme(HttpForward.Scheme scheme)
The scheme to use when forwarded the request, either HTTP or HTTPS. If not specified the scheme defaults to HTTP.

Parameters:
scheme - the scheme as a HttpForward.Scheme value


Copyright © 2017. All rights reserved.