Class HttpRequestConfig
- java.lang.Object
-
- com.floragunn.signals.watch.common.WatchElement
-
- com.floragunn.signals.watch.common.HttpRequestConfig
-
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject
public class HttpRequestConfig extends WatchElement implements org.elasticsearch.common.xcontent.ToXContentObject
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpRequestConfig.Method
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckHttpResponse(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response)voidcompileScripts(WatchInitializationService watchInitializationService)static HttpRequestConfigcreate(WatchInitializationService watchInitService, com.fasterxml.jackson.databind.JsonNode objectNode)org.apache.http.client.methods.HttpUriRequestcreateHttpRequest(WatchExecutionContext ctx)static HttpRequestConfigcreateWithoutCompilation(com.fasterxml.jackson.databind.JsonNode objectNode)AuthgetAuth()StringgetBody()Map<String,Object>getHeaders()StringgetPath()URIgetUri()voidsetAuth(Auth auth)voidsetBody(String body)voidsetHeaders(Map<String,Object> headers)voidsetPath(String path)voidsetUri(URI uri)org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)-
Methods inherited from class com.floragunn.signals.watch.common.WatchElement
getChildByNameAndType, getChildByNameAndType, getChildren, getName, render, render
-
-
-
-
Method Detail
-
getUri
public URI getUri()
-
setUri
public void setUri(URI uri)
-
getPath
public String getPath()
-
setPath
public void setPath(String path)
-
getBody
public String getBody()
-
setBody
public void setBody(String body)
-
compileScripts
public void compileScripts(WatchInitializationService watchInitializationService) throws com.floragunn.searchsupport.jobs.config.validation.ConfigValidationException
- Throws:
com.floragunn.searchsupport.jobs.config.validation.ConfigValidationException
-
createHttpRequest
public org.apache.http.client.methods.HttpUriRequest createHttpRequest(WatchExecutionContext ctx) throws UnsupportedEncodingException, WatchExecutionException, HttpEndpointWhitelist.NotWhitelistedException
-
checkHttpResponse
public void checkHttpResponse(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response) throws WatchExecutionException- Throws:
WatchExecutionException
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
IOException
-
create
public static HttpRequestConfig create(WatchInitializationService watchInitService, com.fasterxml.jackson.databind.JsonNode objectNode) throws com.floragunn.searchsupport.jobs.config.validation.ConfigValidationException
- Throws:
com.floragunn.searchsupport.jobs.config.validation.ConfigValidationException
-
createWithoutCompilation
public static HttpRequestConfig createWithoutCompilation(com.fasterxml.jackson.databind.JsonNode objectNode) throws com.floragunn.searchsupport.jobs.config.validation.ConfigValidationException
- Throws:
com.floragunn.searchsupport.jobs.config.validation.ConfigValidationException
-
getAuth
public Auth getAuth()
-
setAuth
public void setAuth(Auth auth)
-
-