Class InvocationRegistry
java.lang.Object
dev.langchain4j.test.service.internal.InvocationRegistry
Assigns AI Service events to recordings. An invocation belongs to a recording when it starts on a thread that is
recording, or when it was started by an invocation that belongs to it. All later events of the invocation are
matched by its invocation id.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidclose(RecordingSession recording) Stops matching events to the invocations of the given recording.static booleanReturns whether the recording listeners were registered with at least one AI Service in this JVM.static RecordingSessionstatic RecordingSessionstartRecordingThread(RecordingSession recording) Starts a recording on the current thread.static voidstopRecordingThread(RecordingSession previous)
-
Method Details
-
isListening
public static boolean isListening()Returns whether the recording listeners were registered with at least one AI Service in this JVM. -
startRecordingThread
Starts a recording on the current thread.- Returns:
- the recording that was active on this thread before, to be passed to
stopRecordingThread(RecordingSession)
-
stopRecordingThread
-
newSession
-
close
Stops matching events to the invocations of the given recording.
-