SAIF.NetCore.Clients.UC4 overview¶
Documentation context: Distributed as a NuGet package.
SAIF.NetCore.Clients.UC4 is a thin implementation-layer client library that lets a SAIF application schedule jobs against the UC4/Automic job-scheduling system's "UC4 Core API" over HTTP, without taking on any dependency beyond the SAIF foundation contracts.
Purpose¶
- Provide a single typed client,
IUC4Client/UC4Client, that schedules a named UC4/Automic job by posting an empty JSON object ({}), with no job parameters, to a configured route. - Validate at construction time that the Environment API holds the two settings the client needs (
uc4coreapi:url,uc4coreapi:schedulejobroute), failing fast withNotSupportedExceptionif either key is absent. - Leave authentication, retry, and response handling to the injected
IHttpJsonClient, and leave success/failure interpretation to the calling application.
Responsibilities¶
- Resolve and cache the UC4 Core API base URL and schedule-job route from the Environment API section
uc4coreapi. - Lazily configure the injected
IHttpJsonClientwith caller-identity information (Client-User,Client-Name,Application-ID) on the firstScheduleJobcall. - Issue the outbound POST that starts a named UC4 job and return the raw
IHttpRequestResultunchanged.
Key components¶
IUC4Client(SAIF.NetCore.Clients.UC4): the public contract exposingScheduleJob(string appname, string jobname).UC4Client(SAIF.NetCore.Clients.UC4.Services): the sole implementation; owns settings validation, lazy initialization, and the outbound call.Constants(internal): theuc4coreapisetting-group and key names.
Related documentation¶
Sources¶
src/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4.csprojsrc/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/Constants.cssrc/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/IUC4Client.cssrc/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/Services/UC4Client.cs