Package-level declarations
Types
Who may use a resource (ADR 0008). A CoapServer asks the policy that governs the resource a request is for right after it found the resource, before it does any work for the request: a refused request gets 4.01 Unauthorized, or 4.03 Forbidden when message security authenticated it (RFC 7252 §5.9.2.2, §5.9.2.4), and reaches no handler, buffers no Block1 or Q-Block1 body, registers, replaces or cancels no observation and gets no Q-Block2 burst. The refusal is protected when the request was.
What an AccessPolicy decides on: a request, before the server did any work for it, or for /.well-known/core a GET of a resource it would list.
Which responses a CoapServer holds back from a client whose address it has not verified, answering with a short 4.01 Unauthorized carrying an Echo option instead (RFC 9175 §2.4 item 3). RFC 9175 §2.6 updates RFC 7252 §11.3: a server SHOULD mitigate amplification this way towards unauthenticated clients, since over UDP the source address of a request proves nothing and a large answer to a spoofed one lands on the victim the address names.
A resource of a CoapServer, identified by its path from the root. Subclass it and override the handlers for the methods it supports; the others answer 4.05 Method Not Allowed (RFC 7252 §5.9.2.6). For resources defined inline, see the DSL in ResourceBuilder.
Thrown by a resource handler to answer its request with response, a 4.xx or 5.xx error (RFC 7252 §5.9.2, §5.9.3), as if the handler had returned it, from however deep in the application's code: a validation, a repository that finds nothing, an authorization check. The client gets response as it is, diagnostic payload and options included, and the server logs it at DEBUG only, since it is an ordinary outcome and not a failure.
A CoAP server: routes requests on a CoapEndpoint to a tree of CoapResources.
How a CoapServer processes requests.
Marks the resource DSL, so nested blocks do not see the outer builder's members.
A resource clients can observe (RFC 7641). A GET or FETCH with Observe 0 that the handler answers with 2.xx adds the client to the observers; call notifyObservers whenever the state changes, and every observer gets a notification produced by calling the handler again with its registration request.
Whether and how a CoapServer serves Q-Block (RFC 9177): Q-Block1 uploads and Q-Block2 bodies, sent and repaired in bursts of MAX_PAYLOADS Non-confirmable blocks (dev.kcoap.coap.stack.TransmissionParameters).
A request as a resource handler sees it: verified by message security, reassembled from Block1 transfers, and with who sent it. This is the server's application model, the counterpart of the client's CoapRequest: method, path, query, options and payload, without the messaging-layer fields (type, Message ID, token), which differ by transport and mean nothing to a handler.
A request handler in the DSL: the RequestContext is the receiver.
What /.well-known/core says about a resource (RFC 6690 §3, RFC 7252 §7.2.1). The obs hint (RFC 7641 §6) is added for observable resources automatically. Immutable: the lists given are copied.
Defines resources inline, as an alternative to subclassing CoapResource:
How much a CoapServer holds at the moment CoapServer.stats was called, for gauges in metrics and for diagnostics; set each against the bound of CoapServerConfig it names. What its endpoint holds is CoapEndpoint.stats(), and what happened is counted from its EndpointEvents.