Package org.mockserver.model
Class HttpForward
- java.lang.Object
-
- org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
-
- org.mockserver.model.ObjectWithJsonToString
-
- org.mockserver.model.Action<HttpForward>
-
- org.mockserver.model.HttpForward
-
public class HttpForward extends Action<HttpForward>
- Author:
- jamesdbloom
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpForward.Scheme-
Nested classes/interfaces inherited from class org.mockserver.model.Action
Action.Direction, Action.Type
-
-
Constructor Summary
Constructors Constructor Description HttpForward()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static HttpForwardforward()Static builder to create a forward.StringgetHost()IntegergetPort()HttpForward.SchemegetScheme()Action.TypegetType()inthashCode()HttpForwardwithHost(String host)The host or ip address to forward the request to i.e.HttpForwardwithPort(Integer port)The port to forward the request to i.e. 80.HttpForwardwithScheme(HttpForward.Scheme scheme)The scheme to use when forwarded the request, either HTTP or HTTPS.-
Methods inherited from class org.mockserver.model.Action
getDelay, getExpectationId, isPrimary, setExpectationId, withDelay, withDelay, withPrimary
-
Methods inherited from class org.mockserver.model.ObjectWithJsonToString
toString
-
Methods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
fieldsExcludedFromEqualsAndHashCode
-
-
-
-
Method Detail
-
forward
public static HttpForward forward()
Static builder to create a forward.
-
getType
public Action.Type getType()
- Specified by:
getTypein classAction<HttpForward>
-
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
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classAction<HttpForward>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAction<HttpForward>
-
-