Package xyz.tcheeric.jev
Class JevClient
java.lang.Object
xyz.tcheeric.jev.JevClient
- All Implemented Interfaces:
AutoCloseable
The one entry point into the evaluator.
A caller hands over a state and a fan-out of named, typed questions, and gets back the typed answers keyed by those names, in a single request. The client owns bearer auth, the request timeout, and retry with exponential backoff and jitter.
It owns nothing else. There is no method here that counts an answer, compares a date, or
turns a probability into a decision (ADR 0002). Several consumers are ranked for this
library and each calibrates its own thresholds; a convenience such as isSpam() would
quietly make this library the owner of all of their judgement calls.
-
Constructor Summary
ConstructorsConstructorDescriptionJevClient(JevConfig config, JevWireCodec codec) Takes the codec explicitly so that a corrected wire format can be supplied without touching this class. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Idempotent, and guarded by a ReentrantLock rather than a synchronized block, which would pin the carrier thread of a virtual thread mid-request.Asks every question about one state in one request and returns the answers by name.models()The model names the account may send.
-
Constructor Details
-
JevClient
-
JevClient
Takes the codec explicitly so that a corrected wire format can be supplied without touching this class. SeeWIRE.md.
-
-
Method Details
-
evaluate
Asks every question about one state in one request and returns the answers by name. -
evaluate
-
models
The model names the account may send. Aliases appear here too; this client still refuses them inJevConfig, so the list is for discovering the version an alias points at, not for choosing one at run time. -
close
public void close()Idempotent, and guarded by a ReentrantLock rather than a synchronized block, which would pin the carrier thread of a virtual thread mid-request.- Specified by:
closein interfaceAutoCloseable
-