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 voidcancelled()voidcompleted(Void result)voidfailed(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:
 completedin interfaceorg.apache.hc.core5.concurrent.FutureCallback<Void>
 
- 
failed
public void failed(Exception ex)
- Specified by:
 failedin interfaceorg.apache.hc.core5.concurrent.FutureCallback<Void>
 
- 
cancelled
public void cancelled()
- Specified by:
 cancelledin interfaceorg.apache.hc.core5.concurrent.FutureCallback<Void>
 
 - 
 
 -