public interface UserCoordinator
| Modifier and Type | Method and Description |
|---|---|
void |
begin(String serviceType)
Start a new activity.
|
void |
begin(String serviceType,
int timeout)
Start a new activity.
|
void |
cancel()
Cancel the activity.
|
void |
confirm()
Confirm the current activity.
|
ActivityHierarchy |
currentActivity() |
int |
getTimeout()
Get the timeout value currently associated with activities.
|
CoordinatorId |
identifier() |
void |
resume(ActivityHierarchy tx)
Given a token representing a context, associate it with the current
thread of control.
|
void |
setCancelOnly()
Set the termination status for the current activity to cancel only.
|
void |
setTimeout(int timeout)
Set the timeout to be associated with all subsequently created
activities.
|
Status |
status() |
ActivityHierarchy |
suspend()
Suspend the current activity from this thread and return the token
representing the context, if any, or null otherwise.
|
void begin(String serviceType) throws WrongStateException, SystemException
WrongStateException - Thrown if the any currently associated
activity is in a state that does not allow a new activity to be
enlisted.SystemException - Thrown in any other situation.void begin(String serviceType, int timeout) throws WrongStateException, InvalidTimeoutException, SystemException
timeout - The timeout associated with the activity (in
seconds). If the activity has not been terminated by the time this
period elapses, then it will automatically be terminated.WrongStateException - Thrown if the currently associated
activity is in a state that does not allow a new activity to be
enlisted as a child.InvalidTimeoutException - Thrown if the specified timeout is
invalid within the current working environment.SystemException - Thrown in any other situation.void confirm()
throws InvalidActivityException,
WrongStateException,
ProtocolViolationException,
NoCoordinatorException,
CoordinatorCancelledException,
HeuristicMixedException,
HeuristicHazardException,
NoPermissionException,
SystemException
InvalidActivityException - Thrown if the current activity is
invalid in the execution environment.WrongStateException - Thrown if the current activity is not in a
state that allows it to be completed in the status requested.ProtocolViolationException - Thrown if the a violation of the
activity service or HLS protocol occurs.NoPermissionException - Thrown if the invoking thread does
not have permission to terminate the transaction.SystemException - Thrown if some other error occurred.NoCoordinatorExceptionCoordinatorCancelledExceptionHeuristicMixedExceptionHeuristicHazardExceptionvoid cancel()
throws InvalidActivityException,
WrongStateException,
ProtocolViolationException,
NoCoordinatorException,
CoordinatorConfirmedException,
HeuristicMixedException,
HeuristicHazardException,
NoPermissionException,
SystemException
InvalidActivityException - Thrown if the current activity is
invalid in the execution environment.WrongStateException - Thrown if the current activity is not in a
state that allows it to be completed, or is incompatible with the
completion status provided.ProtocolViolationException - Thrown if the a violation of the
activity service or HLS protocol occurs.NoPermissionException - Thrown if the invoking thread does
not have permission to terminate the transaction.SystemException - Thrown if some other error occurred.NoCoordinatorExceptionCoordinatorConfirmedExceptionHeuristicMixedExceptionHeuristicHazardExceptionOutcomevoid setCancelOnly()
throws NoCoordinatorException,
WrongStateException,
SystemException
WrongStateException - Thrown if the completion status is
incompatible with the current state of the activity.SystemException - Thrown if any other error occurs.NoCoordinatorExceptionint getTimeout()
throws SystemException
SystemException - Thrown if any error occurs.void setTimeout(int timeout)
throws InvalidTimeoutException,
SystemException
timeout - The timeout (in seconds) to associate with all
subsequently created activities. This value must be 0 or greater.InvalidTimeoutException - Thrown if the timeout value provided
is negative, too large, or if timeouts are simply not supported by
the activity implementation.SystemException - Thrown if any other error occurs.Status status() throws SystemException
SystemException - Thrown if any error occurs.StatusCoordinatorId identifier() throws NoActivityException, SystemException
NoActivityException - Thrown if there is no activity
associated with the invoking thread.SystemException - Thrown if some other error occurred.ActivityHierarchy suspend() throws SystemException
SystemException - Thrown if any error occurs.void resume(ActivityHierarchy tx) throws InvalidActivityException, SystemException
tx - The activity to associate with this thread. This
may be null in which case the current thread becomes associated with
no activity.InvalidActivityException - Thrown if the activity handle
is invalid in this context.SystemException - Thrown if any other error occurs.ActivityHierarchy currentActivity() throws SystemException
SystemException - Thrown if any error occurs.Copyright © 2018 JBoss by Red Hat. All rights reserved.