EndpointEvent
Something that happened on a CoapEndpoint, for metrics and diagnostics. Messages themselves are seen through a MessageInterceptor; events cover what has no message of its own.
New subtypes may be added before 1.0, so a when over events should have an else branch.
Inheritors
Types
The peer aborted the connection (RFC 8323 §5.6).
This endpoint aborted the connection (RFC 8323 §5.6), for example after a missing CSM, a message format error, a message above its Max-Message-Size or an unknown critical signaling option.
The connection to peer closed. Its exchanges failed with CoapException.Reason.CONNECTION_CLOSED and its observations ended (RFC 8323 §3.4, §7.4).
A connection to peer was opened (isInitiator) or accepted (RFC 8323); the CSM exchange follows.
The peer sent a CSM (RFC 8323 §5.3). The values are the settings in force after it, since CSM options are cumulative: its Max-Message-Size, and whether it announced Block-Wise-Transfer.
A message arrived again within its deduplication lifetime (RFC 7252 §4.5).
A well-formed message from peer was rejected with a Reset, dropped or ignored, because it broke a rule of the messaging layer or this endpoint lacked the context to process it; or a datagram was dropped unparsed because no answer could reach its source (Reason.INVALID_SOURCE). On reliable transports, which have no Message IDs, messageId is 0. reason is a bounded set fit for counting; detail, when there is one, adds what a log needs, such as the numbers of unrecognized options.
A client was added to the observers of path (RFC 7641 §4.1).
A partially received Q-Block body from peer, an upload on a server or a response body on a client, was given up and its state dropped (RFC 9177 §4.3, §4.4, §7.2): its missing blocks were asked for NON_MAX_RETRANSMIT times without success, no block came for NON_PARTIAL_TIMEOUT, the peer answered a 4.08 with a Reset, or the peer's session ended; reason says which. On a client the request fails.
A client with Q-Block on (QBlockClientConfig) uses RFC 7959 block-wise transfer instead of Q-Block towards peer (RFC 9177 §4.1), for reason: the probe was answered with 4.02 Bad Option, a Reset or a response without Q-Block, or not at all, or the server rejected a Q-Block request with 4.02 or a Reset before answering anything else, in which case that request is sent again with RFC 7959. Reported once per finding, not per request.
Missing blocks of a Q-Block body (RFC 9177 §4.3, §4.4, §5) were asked for, by a server or a client with Q-Block on. isRequestedByPeer is true when peer asked, with a 4.08 Request Entity Incomplete listing blocks of an upload or a request for missing Q-Block2 blocks of a response, and this endpoint sends blocks again; false when this endpoint asked peer for blocks the same ways. Many of these towards one peer show a lossy path, for which RFC 9177 §7.2 suggests a smaller MAX_PAYLOADS.
The peer sent a Release (RFC 8323 §5.5): the connection takes no new requests and closes once the requests in progress are answered. Clients do not reconnect to peer for holdOff. The alternativeAddresses are reported, not followed: a connection there would not inherit the security properties of this one (§10.1), so following them is the application's decision.
A CoapServer finished a request from peer: one event per request message, each block of a Block1 or Q-Block1 body included, also for a request that message security rejected or challenged, so it counts OSCORE traffic, whose outer codes are all a MessageInterceptor sees.
The peer answered one of our messages with a Reset.
A response from peer to a request message security protected, which the client did not act on because it was not verified. Nothing else shows it to an observation, whose collectors a failure would end, which RFC 8613 §8.4.2 forbids for one bad notification. reason is a bounded set fit for counting; detail is what the security layer said, for a log.
A Confirmable message was sent again (RFC 7252 §4.2); attempt counts from 1.
Message security on a CoapServer did not let a request from peer reach a resource, for reason, and answered it with responseCode. Its RequestCompleted follows. error is what the security layer threw for a request that failed verification; with kcoap-oscore its cause is the OscoreException, whose OscoreError can be counted.
The DTLS session to peer ended; its exchanges and observations were failed (RFC 7252 §9.1.1).
A Confirmable message was not acknowledged after MAX_RETRANSMIT retransmissions.