public class HttpMeta
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private com.ning.http.client.AsyncHttpClient |
asyncHttpClient
The async http client.
|
private java.lang.String |
entityBody
The request entityBody.
|
private HttpMethod |
httpMethod
The http method.
|
private HttpPollerProcessor |
httpPollerProcessor
The http poller processor.
|
private boolean |
isPollable
The is pollable.
|
private static org.slf4j.Logger |
logger
The logger.
|
private ParallecHeader |
parallecHeader
The parallec header.
|
private java.lang.String |
requestPort
The request port.
|
private java.lang.String |
requestUrlPostfix
The request url postfix.
|
private ResponseHeaderMeta |
responseHeaderMeta
The response header meta: which keys are needed to get from response header.
|
Constructor and Description |
---|
HttpMeta()
Instantiates a new command meta.
|
HttpMeta(HttpMethod httpMethod,
java.lang.String requestUrlPostfix,
java.lang.String entityBody,
java.lang.String requestPort,
ParallecHeader parallecHeader)
Instantiates a new http meta.
|
Modifier and Type | Method and Description |
---|---|
com.ning.http.client.AsyncHttpClient |
getAsyncHttpClient()
Gets the async http client.
|
java.lang.String |
getEntityBody()
Gets the request content template.
|
ParallecHeader |
getHeaderMetadata()
Gets the header metadata.
|
HttpMethod |
getHttpMethod()
Gets the http method.
|
HttpPollerProcessor |
getHttpPollerProcessor()
Gets the http poller processor.
|
java.lang.String |
getRequestPort()
Gets the request port.
|
java.lang.String |
getRequestUrlPostfix()
Gets the request url postfix.
|
ResponseHeaderMeta |
getResponseHeaderMeta()
Gets the response header meta.
|
void |
initValuesNa()
for none HTTP type: set some default for HTTP (not used) to avoid NPE.
|
boolean |
isPollable()
Checks if is pollable.
|
static java.lang.String |
replaceDefaultFullRequestContent(java.lang.String requestContentTemplate)
Replace default full request content.
|
static java.lang.String |
replaceFullRequestContent(java.lang.String requestContentTemplate,
java.lang.String replacementString)
Replace full request content.
|
void |
setAsyncHttpClient(com.ning.http.client.AsyncHttpClient asyncHttpClient)
Sets the async http client.
|
void |
setEntityBody(java.lang.String entityBody)
Sets the entity body.
|
void |
setHeaderMetadata(ParallecHeader parallecHeader)
Sets the header metadata.
|
void |
setHttpMethod(HttpMethod httpMethod)
Sets the http method.
|
void |
setHttpPollerProcessor(HttpPollerProcessor httpPollerProcessor)
Sets the http poller processor.
|
void |
setPollable(boolean isPollable)
Sets the pollable.
|
void |
setRequestPort(java.lang.String requestPort)
Sets the request port.
|
void |
setRequestUrlPostfix(java.lang.String requestUrlPostfix)
will trim the leading and trailing whitespace if not null.
|
void |
setResponseHeaderMeta(ResponseHeaderMeta responseHeaderMeta)
Sets the response header meta.
|
java.lang.String |
toString() |
boolean |
validation()
Validation.
|
private static org.slf4j.Logger logger
private HttpMethod httpMethod
private java.lang.String requestUrlPostfix
private java.lang.String entityBody
private java.lang.String requestPort
private ParallecHeader parallecHeader
private HttpPollerProcessor httpPollerProcessor
private boolean isPollable
private com.ning.http.client.AsyncHttpClient asyncHttpClient
private ResponseHeaderMeta responseHeaderMeta
public HttpMeta()
public HttpMeta(HttpMethod httpMethod, java.lang.String requestUrlPostfix, java.lang.String entityBody, java.lang.String requestPort, ParallecHeader parallecHeader)
httpMethod
- the http methodrequestUrlPostfix
- the request url postfixentityBody
- the entity bodyrequestPort
- the request portparallecHeader
- the parallec headerpublic void initValuesNa()
public boolean validation() throws ParallelTaskInvalidException
ParallelTaskInvalidException
- the parallel task invalid exceptionpublic java.lang.String getRequestPort()
public void setRequestPort(java.lang.String requestPort)
requestPort
- the new request portpublic HttpMethod getHttpMethod()
public void setHttpMethod(HttpMethod httpMethod)
httpMethod
- the new http methodpublic java.lang.String getRequestUrlPostfix()
public void setRequestUrlPostfix(java.lang.String requestUrlPostfix)
requestUrlPostfix
- the new request url postfixpublic java.lang.String getEntityBody()
public void setEntityBody(java.lang.String entityBody)
entityBody
- the new entity bodypublic java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String replaceFullRequestContent(java.lang.String requestContentTemplate, java.lang.String replacementString)
requestContentTemplate
- the request content templatereplacementString
- the replacement stringpublic static java.lang.String replaceDefaultFullRequestContent(java.lang.String requestContentTemplate)
requestContentTemplate
- the request content templatepublic ParallecHeader getHeaderMetadata()
public void setHeaderMetadata(ParallecHeader parallecHeader)
parallecHeader
- the new header metadatapublic HttpPollerProcessor getHttpPollerProcessor()
public void setHttpPollerProcessor(HttpPollerProcessor httpPollerProcessor)
httpPollerProcessor
- the new http poller processorpublic boolean isPollable()
public void setPollable(boolean isPollable)
isPollable
- the new pollablepublic com.ning.http.client.AsyncHttpClient getAsyncHttpClient()
public void setAsyncHttpClient(com.ning.http.client.AsyncHttpClient asyncHttpClient)
asyncHttpClient
- the new async http clientpublic ResponseHeaderMeta getResponseHeaderMeta()
public void setResponseHeaderMeta(ResponseHeaderMeta responseHeaderMeta)
responseHeaderMeta
- the new response header meta