Class LraCancelOnResource
java.lang.Object
org.eclipse.microprofile.lra.tck.participant.api.LraCancelOnResource
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponsecancelFromRemoteCall(URI lraId, jakarta.ws.rs.core.UriInfo uriInfo) Returning200thus the LRA should be closed but beforehand it makes a remote REST call which returns 5xx which is the default for the cancelling and so the whole LRA should be cancelled.jakarta.ws.rs.core.ResponsecancelOn301(URI lraId) Cancel on is set to301.jakarta.ws.rs.core.ResponsecancelOnFamily3xx(URI lraId) Cancel on family is set to3xx.jakarta.ws.rs.core.ResponsecancelOnFamilyDefault4xx(URI lraId) Default return status for cancelling LRA is4xxand5xxjakarta.ws.rs.core.ResponsecancelOnFamilyDefault5xx(URI lraId) Default return status for cancelling LRA is4xxand5xxjakarta.ws.rs.core.ResponsecompensateWork(URI lraId) jakarta.ws.rs.core.ResponsecompleteWork(URI lraId) jakarta.ws.rs.core.ResponsenotCancelOnFamily5xx(URI lraId) Cancel on family is set to4xx, the code from other families (e.g.
-
Field Details
-
LRA_CANCEL_ON_RESOURCE_PATH
- See Also:
-
CANCEL_ON_FAMILY_DEFAULT_4XX
- See Also:
-
CANCEL_ON_FAMILY_DEFAULT_5XX
- See Also:
-
CANCEL_ON_FAMILY_3XX
- See Also:
-
CANCEL_ON_301
- See Also:
-
NOT_CANCEL_ON_FAMILY_5XX
- See Also:
-
CANCEL_FROM_REMOTE_CALL
- See Also:
-
-
Constructor Details
-
LraCancelOnResource
public LraCancelOnResource()
-
-
Method Details
-
cancelOnFamilyDefault4xx
@GET @Path("cancelOnFamilyDefault4xx") public jakarta.ws.rs.core.Response cancelOnFamilyDefault4xx(@HeaderParam("Long-Running-Action") URI lraId) Default return status for cancelling LRA is4xxand5xx- Parameters:
lraId- The LRA id generated for this action- Returns:
- JAX-RS response
-
cancelOnFamilyDefault5xx
@GET @Path("cancelOnFamilyDefault5xx") public jakarta.ws.rs.core.Response cancelOnFamilyDefault5xx(@HeaderParam("Long-Running-Action") URI lraId) Default return status for cancelling LRA is4xxand5xx- Parameters:
lraId- The LRA id generated for this action- Returns:
- JAX-RS response
-
cancelOnFamily3xx
@GET @Path("cancelOnFamily3xx") public jakarta.ws.rs.core.Response cancelOnFamily3xx(@HeaderParam("Long-Running-Action") URI lraId) Cancel on family is set to3xx. The3xxreturn code has to cancel the LRA.- Parameters:
lraId- The LRA id generated for this action- Returns:
- JAX-RS response
-
cancelOn301
@GET @Path("cancelOn301") public jakarta.ws.rs.core.Response cancelOn301(@HeaderParam("Long-Running-Action") URI lraId) Cancel on is set to301. The301return code has to cancel the LRA.- Parameters:
lraId- The LRA id generated for this action- Returns:
- JAX-RS response
-
notCancelOnFamily5xx
@GET @Path("notCancelOnFamily5xx") public jakarta.ws.rs.core.Response notCancelOnFamily5xx(@HeaderParam("Long-Running-Action") URI lraId) Cancel on family is set to4xx, the code from other families (e.g. for5xxshould not cancel but should go with close the LRA.- Parameters:
lraId- The LRA id generated for this action- Returns:
- JAX-RS response
-
cancelFromRemoteCall
@GET @Path("cancelFromRemoteCall") public jakarta.ws.rs.core.Response cancelFromRemoteCall(@HeaderParam("Long-Running-Action") URI lraId, @Context jakarta.ws.rs.core.UriInfo uriInfo) Returning
200thus the LRA should be closed but beforehand it makes a remote REST call which returns 5xx which is the default for the cancelling and so the whole LRA should be cancelled.The remote REST call invokes the same resource class
LraCancelOnResourceThat assumes the call to the representative of the same LRA participant as it's already enlisted by the methodcancelFromRemoteCall(java.net.URI, jakarta.ws.rs.core.UriInfo)invoked by the test. Because the specification mandates that the same participant can be enlisted only once per LRA instance then theCompensatemethodcompensateWork(URI)will be called only once for the test invocation.- Parameters:
lraId- The LRA id generated for this actionuriInfo- as context provided by JAX-RS to find base service URI- Returns:
- JAX-RS response
-
completeWork
@PUT @Path("/complete") public jakarta.ws.rs.core.Response completeWork(@HeaderParam("Long-Running-Action") URI lraId) -
compensateWork
@PUT @Path("/compensate") public jakarta.ws.rs.core.Response compensateWork(@HeaderParam("Long-Running-Action") URI lraId)
-