public class ActivityImple extends Object
Constructor and Description |
---|
ActivityImple(ActivityImple parent,
String serviceType) |
ActivityImple(String coordinationType) |
Modifier and Type | Method and Description |
---|---|
String |
activityName()
What is the name of the current activity? Use only for debugging
purposes!
|
void |
completionValid(CompletionStatus cs)
Check whether the specified completion status is compatible with the one
currently assigned to the activity.
|
Outcome |
end()
Complete the activity with the current completion status.
|
Outcome |
end(CompletionStatus cs)
Complete the activity with the completion status provided.
|
boolean |
equals(Object obj) |
CompletionStatus |
getCompletionStatus()
Get the completion status currently associated with the activity.
|
GlobalId |
getGlobalId() |
int |
getTimeout()
Get the timeout value currently associated with activities.
|
int |
hashCode() |
ActivityImple[] |
hierarchy()
Return the activity hierarchy that this activity is within.
|
ActivityImple |
parent() |
String |
serviceType() |
void |
setCompletionStatus(CompletionStatus endStatus)
Set the termination status for the current activity, if any.
|
void |
start()
Start a new activity.
|
void |
start(int timeout)
Start a new activity.
|
Status |
status() |
String |
toString() |
public ActivityImple(String coordinationType)
public ActivityImple(ActivityImple parent, String serviceType)
public void start() throws WrongStateException, SystemException
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.public void start(int timeout) throws WrongStateException, InvalidTimeoutException, SystemException
timeout
- timeout The timeout associated with the activity. 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.public Outcome end() throws InvalidActivityException, WrongStateException, ProtocolViolationException, NoPermissionException, SystemException
InvalidActivityException
- Thrown if the current activity is not known about by the
activity system.WrongStateException
- Thrown if the current activity is not in a state that
allows it to be completed.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.com.arjuna.mw.wsas.Outcome
public Outcome end(CompletionStatus cs) throws InvalidActivityException, WrongStateException, ProtocolViolationException, NoPermissionException, SystemException
cs
- The CompletionStatus to use.InvalidActivityException
- Thrown if the current activity is not known about by the
activity system.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.com.arjuna.mw.wsas.Outcome
public void setCompletionStatus(CompletionStatus endStatus) throws WrongStateException, SystemException
CompletionStatus
- endStatus The state in which the activity should attempt to
terminate. This may be one of the default values provided by
WSAS or may be extended in an implementation specific manner
by an HLS.NoActivityException
- Thrown if there is no activity associated with the
invoking thread.WrongStateException
- Thrown if the completion status is incompatible with the
current state of the activity.SystemException
- Thrown if any other error occurs.public CompletionStatus getCompletionStatus() throws SystemException
NoActivityException
- Thrown if there is no activity associated with the current
thread.SystemException
- Thrown if any other error occurs.public int getTimeout() throws SystemException
SystemException
- Thrown if any error occurs.public Status status() throws SystemException
SystemException
- Thrown if any error occurs.Status
public String activityName() throws NoActivityException, SystemException
NoActivityException
- Thrown if there is no activity associated with the
invoking thread.SystemException
- Thrown if any other error occurs.public GlobalId getGlobalId()
public ActivityImple parent()
public String serviceType()
public ActivityImple[] hierarchy()
public final void completionValid(CompletionStatus cs) throws WrongStateException
CompletionStatus
- cs The completion status to check.WrongStateException
- Thrown if the specified status is incompatible with that
currently possessed by this activity.Copyright © 2016 JBoss by Red Hat. All rights reserved.