Annotation Interface Idempotent
JAX-RS
NameBinding annotation for selective idempotency protection.
When the IdempotencyContainerFilter is registered with
nameBinding = true, only resource methods or classes annotated with
@Idempotent will be intercepted. All other endpoints are left
unprotected.
Usage
@POST
@Path("/payments")
@Idempotent
public Response createPayment(PaymentRequest request) {
// This endpoint is idempotency-protected
}
@POST
@Path("/logs")
public Response createLog(LogEntry entry) {
// This endpoint is NOT idempotency-protected
}
- See Also: