public class HttpTemplate extends Action
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
HttpTemplate.TemplateType  | 
Action.Typelogger| Constructor and Description | 
|---|
HttpTemplate(HttpTemplate.TemplateType type)  | 
| Modifier and Type | Method and Description | 
|---|---|
HttpTemplate | 
applyDelay()  | 
Delay | 
getDelay()  | 
String | 
getTemplate()  | 
HttpTemplate.TemplateType | 
getTemplateType()  | 
Action.Type | 
getType()  | 
void | 
setActionType(Action.Type actionType)  | 
HttpTemplate | 
shallowClone()  | 
static HttpTemplate | 
template(HttpTemplate.TemplateType type)
Static builder to create an template for responding or forwarding requests. 
 | 
static HttpTemplate | 
template(HttpTemplate.TemplateType type,
        String template)
Static builder to create an template for responding or forwarding requests. 
 | 
HttpTemplate | 
withDelay(Delay delay)
The delay before responding with this request as a Delay object, for example new Delay(TimeUnit.SECONDS, 3) 
 | 
HttpTemplate | 
withDelay(TimeUnit timeUnit,
         long value)
The delay before responding with this request as a Delay object, for example new Delay(TimeUnit.SECONDS, 3) 
 | 
HttpTemplate | 
withTemplate(String template)  | 
toStringaddFieldsExcludedFromEqualsAndHashCode, equals, fieldsExcludedFromEqualsAndHashCode, hashCodepublic HttpTemplate(HttpTemplate.TemplateType type)
public static HttpTemplate template(HttpTemplate.TemplateType type)
public static HttpTemplate template(HttpTemplate.TemplateType type, String template)
template - the template for the response or requestpublic HttpTemplate.TemplateType getTemplateType()
public HttpTemplate withTemplate(String template)
public String getTemplate()
public HttpTemplate withDelay(Delay delay)
delay - a Delay object, for example new Delay(TimeUnit.SECONDS, 3)public HttpTemplate withDelay(TimeUnit timeUnit, long value)
timeUnit - a the time unit, for example TimeUnit.SECONDSvalue - a the number of time units to delay the responsepublic Delay getDelay()
public HttpTemplate applyDelay()
public void setActionType(Action.Type actionType)
public Action.Type getType()
public HttpTemplate shallowClone()
Copyright © 2018. All rights reserved.