Package org.mockserver.model
Class Action<T extends Action>
- java.lang.Object
-
- org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
-
- org.mockserver.model.ObjectWithJsonToString
-
- org.mockserver.model.Action<T>
-
- Direct Known Subclasses:
BinaryResponse,DnsResponse,GrpcStreamResponse,HttpClassCallback,HttpError,HttpForward,HttpForwardValidateAction,HttpLlmResponse,HttpObjectCallback,HttpOverrideForwardedRequest,HttpResponse,HttpSseResponse,HttpTemplate,HttpWebSocketResponse
public abstract class Action<T extends Action> extends ObjectWithJsonToString
- Author:
- jamesdbloom
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAction.Directionstatic classAction.Type
-
Constructor Summary
Constructors Constructor Description Action()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)DelaygetDelay()StringgetExpectationId()abstract Action.TypegetType()inthashCode()booleanisPrimary()ActionsetExpectationId(String expectationId)TwithDelay(TimeUnit timeUnit, long value)The delay before responding with this request as a Delay object, for example new Delay(TimeUnit.SECONDS, 3)TwithDelay(Delay delay)The delay before responding with this request as a Delay object, for example new Delay(TimeUnit.SECONDS, 3)TwithPrimary(boolean primary)-
Methods inherited from class org.mockserver.model.ObjectWithJsonToString
toString
-
Methods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
fieldsExcludedFromEqualsAndHashCode
-
-
-
-
Method Detail
-
withDelay
public T withDelay(Delay delay)
The delay before responding with this request as a Delay object, for example new Delay(TimeUnit.SECONDS, 3)- Parameters:
delay- a Delay object, for example new Delay(TimeUnit.SECONDS, 3)
-
withDelay
public T withDelay(TimeUnit timeUnit, long value)
The delay before responding with this request as a Delay object, for example new Delay(TimeUnit.SECONDS, 3)- Parameters:
timeUnit- the time unit, for example TimeUnit.SECONDSvalue- the number of time units to delay the response
-
getDelay
public Delay getDelay()
-
withPrimary
public T withPrimary(boolean primary)
-
isPrimary
public boolean isPrimary()
-
getExpectationId
public String getExpectationId()
-
getType
public abstract Action.Type getType()
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classObjectWithReflectiveEqualsHashCodeToString
-
hashCode
public int hashCode()
- Overrides:
hashCodein classObjectWithReflectiveEqualsHashCodeToString
-
-