Class QueryRequestAndResponse
- java.lang.Object
-
- com.lucidworks.apollo.pipeline.query.QueryRequestAndResponse
-
- All Implemented Interfaces:
Aggregatable
,Copyable<QueryRequestAndResponse>
public class QueryRequestAndResponse extends java.lang.Object implements Aggregatable, Copyable<QueryRequestAndResponse>
-
-
Field Summary
Fields Modifier and Type Field Description Request
request
static java.lang.String
REQUEST_HEADERS
static java.lang.String
REQUEST_HTTP_METHOD
static java.lang.String
REQUEST_PARAMS
static java.lang.String
REQUEST_PREFIX
java.util.Optional<Response>
response
static java.lang.String
RESPONSE_ENTITY
static java.lang.String
RESPONSE_HEADERS
static java.lang.String
RESPONSE_PREFIX
static java.lang.String
TOTAL_TIME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Aggregatable
addField(java.lang.String field, java.lang.Object value)
Aggregatable
addFields(java.lang.String field, java.util.Collection<?> values)
Aggregatable
clear()
QueryRequestAndResponse
copyOf()
static QueryRequestAndResponse
create(Request req, Response resp, long totalTime)
DslRequest
getDslRequest()
com.lucidworks.apollo.pipeline.query.DslResponseWrapper
getDslResponse()
java.util.Set<java.lang.String>
getFieldNames()
java.util.List<java.lang.Object>
getFieldValues(java.lang.String field)
java.lang.Object
getFirstFieldValue(java.lang.String field)
long
getStartTime()
long
getTotalTime()
static QueryRequestAndResponse
newRequest(DslRequest dslRequest)
static QueryRequestAndResponse
newRequest(MultivaluedMap<java.lang.String,java.lang.String> queryParams, MultivaluedMap<java.lang.String,java.lang.String> headers, java.lang.String httpMethod)
static QueryRequestAndResponse
newRequest(MultivaluedMap<java.lang.String,java.lang.String> queryParams, MultivaluedMap<java.lang.String,java.lang.String> headers, java.lang.String httpMethod, byte[] entityBytes, MediaType entityMediaType)
Aggregatable
removeFields(java.lang.String field)
void
setDslRequest(DslRequest dslRequest)
void
setDslResponse(com.lucidworks.apollo.pipeline.query.DslResponseWrapper dslResponse)
Aggregatable
setField(java.lang.String field, java.lang.Object value)
Aggregatable
setFields(java.lang.String field, java.util.Collection<?> values)
void
setStartTime(long startTime)
void
setTotalTime(long totalTime)
QueryRequestAndResponse
withResponse(MultivaluedMap<java.lang.String,java.lang.String> headers, AbstractResponse response, long totalTime)
-
-
-
Field Detail
-
request
public final Request request
-
response
public final java.util.Optional<Response> response
-
REQUEST_PREFIX
public static final java.lang.String REQUEST_PREFIX
- See Also:
- Constant Field Values
-
REQUEST_PARAMS
public static final java.lang.String REQUEST_PARAMS
- See Also:
- Constant Field Values
-
REQUEST_HEADERS
public static final java.lang.String REQUEST_HEADERS
- See Also:
- Constant Field Values
-
REQUEST_HTTP_METHOD
public static final java.lang.String REQUEST_HTTP_METHOD
- See Also:
- Constant Field Values
-
RESPONSE_PREFIX
public static final java.lang.String RESPONSE_PREFIX
- See Also:
- Constant Field Values
-
RESPONSE_HEADERS
public static final java.lang.String RESPONSE_HEADERS
- See Also:
- Constant Field Values
-
RESPONSE_ENTITY
public static final java.lang.String RESPONSE_ENTITY
- See Also:
- Constant Field Values
-
TOTAL_TIME
public static final java.lang.String TOTAL_TIME
- See Also:
- Constant Field Values
-
-
Method Detail
-
withResponse
public QueryRequestAndResponse withResponse(MultivaluedMap<java.lang.String,java.lang.String> headers, AbstractResponse response, long totalTime)
-
newRequest
public static QueryRequestAndResponse newRequest(MultivaluedMap<java.lang.String,java.lang.String> queryParams, MultivaluedMap<java.lang.String,java.lang.String> headers, java.lang.String httpMethod)
-
newRequest
public static QueryRequestAndResponse newRequest(MultivaluedMap<java.lang.String,java.lang.String> queryParams, MultivaluedMap<java.lang.String,java.lang.String> headers, java.lang.String httpMethod, byte[] entityBytes, MediaType entityMediaType)
-
newRequest
public static QueryRequestAndResponse newRequest(DslRequest dslRequest)
-
create
public static QueryRequestAndResponse create(Request req, Response resp, long totalTime)
-
copyOf
public QueryRequestAndResponse copyOf()
- Specified by:
copyOf
in interfaceCopyable<QueryRequestAndResponse>
-
getFieldValues
public java.util.List<java.lang.Object> getFieldValues(java.lang.String field)
- Specified by:
getFieldValues
in interfaceAggregatable
-
getFirstFieldValue
public java.lang.Object getFirstFieldValue(java.lang.String field)
- Specified by:
getFirstFieldValue
in interfaceAggregatable
-
removeFields
public Aggregatable removeFields(java.lang.String field)
- Specified by:
removeFields
in interfaceAggregatable
-
setField
public Aggregatable setField(java.lang.String field, java.lang.Object value)
- Specified by:
setField
in interfaceAggregatable
-
setFields
public Aggregatable setFields(java.lang.String field, java.util.Collection<?> values)
- Specified by:
setFields
in interfaceAggregatable
-
addField
public Aggregatable addField(java.lang.String field, java.lang.Object value)
- Specified by:
addField
in interfaceAggregatable
-
addFields
public Aggregatable addFields(java.lang.String field, java.util.Collection<?> values)
- Specified by:
addFields
in interfaceAggregatable
-
clear
public Aggregatable clear()
- Specified by:
clear
in interfaceAggregatable
-
getFieldNames
public java.util.Set<java.lang.String> getFieldNames()
- Specified by:
getFieldNames
in interfaceAggregatable
-
getTotalTime
public long getTotalTime()
-
setTotalTime
public void setTotalTime(long totalTime)
-
getStartTime
public long getStartTime()
-
setStartTime
public void setStartTime(long startTime)
-
getDslRequest
public DslRequest getDslRequest()
-
setDslRequest
public void setDslRequest(DslRequest dslRequest)
-
getDslResponse
public com.lucidworks.apollo.pipeline.query.DslResponseWrapper getDslResponse()
-
setDslResponse
public void setDslResponse(com.lucidworks.apollo.pipeline.query.DslResponseWrapper dslResponse)
-
-