Package com.vaadin.copilot
Class CopilotServerClient
java.lang.Object
com.vaadin.copilot.CopilotServerClient
- Direct Known Subclasses:
AnalyticsClient,FeedbackClient,TestGenerationServerClient,UserInfoServerClient
Base class for Copilot Server API clients
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic enum -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildRequest(URI uri, Object request) static BooleanReturns the Copilot server reachability state.getQueryURI(String path) protected static Stringprotected static voidprotected static voidRecords a failed request unless the server has already been reached in this application run.<REQ,RESP>
voidsendCopilotRequest(String path, REQ request, Class<RESP> responseType, Consumer<RESP> responseHandler, com.vaadin.base.devserver.DevToolsInterface devToolsInterface, String command, tools.jackson.databind.JsonNode respData) <REQ,RESP>
voidsendCopilotRequest(String path, REQ request, Class<RESP> responseType, Consumer<RESP> responseHandler, Consumer<Throwable> errorHandler) reactor.core.DisposablesendReactive(String path, Object request)
-
Field Details
-
SERVER_URL_ENV
- See Also:
-
-
Constructor Details
-
CopilotServerClient
public CopilotServerClient()Constructor initializing HttpClient and ObjectMapper
-
-
Method Details
-
getHttpClient
-
buildRequest
-
getQueryURI
-
getServerBaseUrl
-
sendCopilotRequest
-
sendCopilotRequest
-
sendReactive
-
getCopilotServerReachability
Returns the Copilot server reachability state.nullmeans no request has been attempted,falsemeans an attempt failed, andtruemeans a response was received. -
markCopilotServerReached
protected static void markCopilotServerReached() -
markCopilotServerUnreachable
protected static void markCopilotServerUnreachable()Records a failed request unless the server has already been reached in this application run. -
resolveAiProvider
-