Module org.elasticsearch.xcore
Class InferenceAction.Response
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportResponse
org.elasticsearch.action.ActionResponse
org.elasticsearch.xpack.core.inference.action.InferenceAction.Response
- All Implemented Interfaces:
Writeable,ChunkedToXContent,ChunkedToXContentObject,org.elasticsearch.core.RefCounted
- Enclosing class:
InferenceAction
public static class InferenceAction.Response
extends ActionResponse
implements ChunkedToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.action.ActionResponse
ActionResponse.EmptyNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
EMPTYFields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Constructor Summary
ConstructorsConstructorDescriptionResponse(StreamInput in) Response(InferenceServiceResults results) Response(InferenceServiceResults results, Flow.Publisher<ChunkedToXContent> publisher) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanReturnstrueif these results are streamed as chunks, orfalseif these results contain the entire payload.WhenisStreaming()istrue, the RestHandler will subscribe to this publisher.Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunked(org.elasticsearch.xcontent.ToXContent.Params params) static InferenceServiceResultstransformToServiceResults(List<? extends InferenceResults> parsedResults) voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
toXContentChunked, toXContentChunkedV8Methods inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContentObject
isFragmentMethods inherited from interface org.elasticsearch.core.RefCounted
mustIncRef
-
Constructor Details
-
Response
-
Response
-
Response
- Throws:
IOException
-
-
Method Details
-
transformToServiceResults
public static InferenceServiceResults transformToServiceResults(List<? extends InferenceResults> parsedResults) -
getResults
-
isStreaming
public boolean isStreaming()Returnstrueif these results are streamed as chunks, orfalseif these results contain the entire payload. Currently set to false while it is being implemented. -
publisher
WhenisStreaming()istrue, the RestHandler will subscribe to this publisher. When the RestResponse is finished with the current chunk, it will request the next chunk using the subscription. If the RestResponse is closed, it will cancel the subscription. -
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContentChunked
public Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunked(org.elasticsearch.xcontent.ToXContent.Params params) - Specified by:
toXContentChunkedin interfaceChunkedToXContent
-
equals
-
hashCode
public int hashCode()
-