Class LraResource
java.lang.Object
org.eclipse.microprofile.lra.tck.participant.api.ResourceParent
org.eclipse.microprofile.lra.tck.participant.api.LraResource
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponseacceptWork(URI recoveryId, URI lraId) jakarta.ws.rs.core.ResponseactivityWithLRA(URI recoveryId, URI lraId) jakarta.ws.rs.core.ResponseactivityWithMandatoryLRA(URI recoveryId, URI lraId) jakarta.ws.rs.core.ResponseUsed to close nested LRA in which this resource is enlistedjakarta.ws.rs.core.Responsecompensate(URI lraId) Performing a PUT on "participant URL"/compensate will cause the participant to compensate the work that was done within the scope of the transaction.compensatedStatus(String lraId) jakarta.ws.rs.core.ResponsecompensateWork(URI lraId, URI recoveryId) jakarta.ws.rs.core.ResponsePerforming a PUT on "participant URL"/complete will cause the participant to tidy up and it can forget this transaction.completedStatus(String lraId) jakarta.ws.rs.core.ResponsecompleteWork(URI lraId, URI recoveryId) jakarta.ws.rs.core.ResponsefindAll()voidjakarta.ws.rs.core.ResponseforgetWork(URI lraId, URI recoveryId) jakarta.ws.rs.core.Responsejakarta.ws.rs.core.ResponsemultiLevelNestedActivity(URI recoveryId, URI nestedLRAId, Integer nestedCnt) jakarta.ws.rs.core.ResponsenestedActivity(URI recoveryId, URI nestedLRAId) jakarta.ws.rs.core.ResponsePerforming a GET on the participant URL will return the current status of the participantParticipantStatus, or 410 if the participant does no longer know about this LRA.jakarta.ws.rs.core.ResponsesubActivity(URI lraId) jakarta.ws.rs.core.ResponsesupportsLRACall(URI lraId) jakarta.ws.rs.core.Responsejakarta.ws.rs.core.ResponsetimeLimitTest2(URI lraId) Starts an LRA with the time limit and verifies that after the timelimit is passed the LRA is finished by the invocation to a mandatory LRA endpoint (which should fail with 412)Methods inherited from class org.eclipse.microprofile.lra.tck.participant.api.ResourceParent
afterLRA
-
Field Details
-
LRA_RESOURCE_PATH
- See Also:
-
TRANSACTIONAL_WORK_PATH
- See Also:
-
ACCEPT_WORK
- See Also:
-
TIME_LIMIT
- See Also:
-
TIME_LIMIT_HALF_SEC
- See Also:
-
CANCEL_PATH
- See Also:
-
-
Constructor Details
-
LraResource
public LraResource()
-
-
Method Details
-
status
@GET @Path("/status") @Produces("application/json") public jakarta.ws.rs.core.Response status(@HeaderParam("Long-Running-Action") URI lraId, @HeaderParam("Long-Running-Action-Recovery") URI recoveryId) Performing a GET on the participant URL will return the current status of the participantParticipantStatus, or 410 if the participant does no longer know about this LRA.- Parameters:
lraId- the id of the LRArecoveryId- the recovery id of this enlistment- Returns:
- the status of the LRA
-
leaveWork
@PUT @Path("/leave") @Produces("application/json") public jakarta.ws.rs.core.Response leaveWork(@HeaderParam("Long-Running-Action") URI lraId) -
completeWork
-
compensateWork
-
forgetWork
-
acceptWork
-
supportsLRACall
@PUT @Path("/supports") public jakarta.ws.rs.core.Response supportsLRACall(@HeaderParam("Long-Running-Action") URI lraId) -
subActivity
@PUT @Path("/startViaApi") public jakarta.ws.rs.core.Response subActivity(@HeaderParam("Long-Running-Action") URI lraId) -
activityWithLRA
-
activityWithMandatoryLRA
-
nestedActivity
-
cancelLRA
@PUT @Path("/cancel") public jakarta.ws.rs.core.Response cancelLRA(@HeaderParam("Long-Running-Action") URI lraId) Used to close nested LRA in which this resource is enlisted- Parameters:
lraId- the id of the LRA- Returns:
- the JAX-RS response indicating that LRA should be cancelled
- See Also:
-
multiLevelNestedActivity
-
findAll
@GET @Produces("application/json") public jakarta.ws.rs.core.Response findAll() -
timeLimit
@GET @Path("/timeLimit") @Produces("application/json") public jakarta.ws.rs.core.Response timeLimit(@HeaderParam("Long-Running-Action") URI lraId) -
timeLimitTest2
@GET @Path("/timeLimit2") @Produces("application/json") public jakarta.ws.rs.core.Response timeLimitTest2(@HeaderParam("Long-Running-Action") URI lraId) Starts an LRA with the time limit and verifies that after the timelimit is passed the LRA is finished by the invocation to a mandatory LRA endpoint (which should fail with 412)- Parameters:
lraId- the id of the LRA- Returns:
- the JAX-RS response 200 if successful or the received HTTP status call otherwise
- See Also:
-
compensate
@PUT @Path("/{LRAId}/compensate") @Produces("application/json") public jakarta.ws.rs.core.Response compensate(@PathParam("LRAId") URI lraId) Performing a PUT on "participant URL"/compensate will cause the participant to compensate the work that was done within the scope of the transaction. The participant will either return a 200 OK code and a "status URL" which indicates the outcome and which can be probed (via GET) and will simply return the same (implicit) information: "URL"/cannot-compensate "URL"/cannot-complete- Parameters:
lraId- the id of the LRA- Returns:
- the final status of the activity
-
complete
@PUT @Path("/{LRAId}/complete") @Produces("application/json") public jakarta.ws.rs.core.Response complete(@PathParam("LRAId") URI lraId) Performing a PUT on "participant URL"/complete will cause the participant to tidy up and it can forget this transaction. The participant will either return a 200 OK code and a "status URL" which indicates the outcome and which can be probed (via GET) and will simply return the same (implicit) information: "URL"/cannot-compensate "URL"/cannot-complete- Parameters:
lraId- the id of the LRA- Returns:
- the final status of the activity
-
forget
-
completedStatus
-
compensatedStatus
-