Class GPTChatCompletionServiceImpl.EnsureResultFutureCallback
- java.lang.Object
-
- com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.EnsureResultFutureCallback
-
- All Implemented Interfaces:
org.apache.hc.core5.concurrent.FutureCallback<Void>
- Enclosing class:
- GPTChatCompletionServiceImpl
protected static class GPTChatCompletionServiceImpl.EnsureResultFutureCallback extends Object implements org.apache.hc.core5.concurrent.FutureCallback<Void>
Makes doubly sure that result is somehow set after the call.
-
-
Field Summary
Fields Modifier and Type Field Description protected CompletableFuture<Void>
result
-
Constructor Summary
Constructors Constructor Description EnsureResultFutureCallback(CompletableFuture<Void> result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelled()
void
completed(Void result)
void
failed(Exception ex)
-
-
-
Field Detail
-
result
@Nonnull protected final CompletableFuture<Void> result
-
-
Constructor Detail
-
EnsureResultFutureCallback
public EnsureResultFutureCallback(@Nonnull CompletableFuture<Void> result)
-
-
Method Detail
-
completed
public void completed(Void result)
- Specified by:
completed
in interfaceorg.apache.hc.core5.concurrent.FutureCallback<Void>
-
failed
public void failed(Exception ex)
- Specified by:
failed
in interfaceorg.apache.hc.core5.concurrent.FutureCallback<Void>
-
cancelled
public void cancelled()
- Specified by:
cancelled
in interfaceorg.apache.hc.core5.concurrent.FutureCallback<Void>
-
-