Class MultiSearchTemplateResponse.Item
- java.lang.Object
-
- org.elasticsearch.script.mustache.MultiSearchTemplateResponse.Item
-
- All Implemented Interfaces:
Streamable
- Enclosing class:
- MultiSearchTemplateResponse
public static class MultiSearchTemplateResponse.Item extends java.lang.Object implements Streamable
A search template response item, holding the actual search template response, or an error message if it failed.
-
-
Constructor Summary
Constructors Constructor Description Item(SearchTemplateResponse response, java.lang.Exception exception)
-
Method Summary
Modifier and Type Method Description java.lang.Exception
getFailure()
java.lang.String
getFailureMessage()
The actual failure message, null if its not a failure.SearchTemplateResponse
getResponse()
The actual search response, null if its a failure.boolean
isFailure()
Is it a failed search?void
readFrom(StreamInput in)
static MultiSearchTemplateResponse.Item
readItem(StreamInput in)
java.lang.String
toString()
void
writeTo(StreamOutput out)
-
-
-
Constructor Detail
-
Item
public Item(SearchTemplateResponse response, java.lang.Exception exception)
-
-
Method Detail
-
isFailure
public boolean isFailure()
Is it a failed search?
-
getFailureMessage
@Nullable public java.lang.String getFailureMessage()
The actual failure message, null if its not a failure.
-
getResponse
@Nullable public SearchTemplateResponse getResponse()
The actual search response, null if its a failure.
-
readItem
public static MultiSearchTemplateResponse.Item readItem(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
- Specified by:
readFrom
in interfaceStreamable
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
- Specified by:
writeTo
in interfaceStreamable
- Throws:
java.io.IOException
-
getFailure
public java.lang.Exception getFailure()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-