Package com.arjuna.mw.wsas.activity
Interface ActivityHierarchy
public interface ActivityHierarchy
This class represents a handle on a stack of activities.
It should only be used for suspending and resuming the
thread-to-activity association.
The activity at the top of the stack is the current activity.
- Since:
- 1.0.
- Version:
- $Id: ActivityHierarchy.java,v 1.1 2002/11/25 10:51:41 nmcl Exp $
- Author:
- Mark Little (mark.little@arjuna.com)
-
Method Summary
Modifier and TypeMethodDescriptionactivity
(int index) copy()
Obtain a copy of this context.current()
boolean
Overrides Object.equals Two contexts are equal if both hierarchies are identical.int
hashCode()
Although users won't typically care what the underlying implementation of a context is, they will need to do comparisons.int
size()
boolean
valid()
-
Method Details
-
size
int size()- Returns:
- the number of activities associated with this stack.
-
valid
boolean valid()- Returns:
- whether or not this is a valid context. If a single entry in the context is invalid then we assume the entire context is.
-
activity
- Parameters:
index
- index of the specific activity in the stack.- Returns:
- the activity handle.
- Throws:
IndexOutOfBoundsException
- Thrown if the activity number is too large or small.
-
current
ActivityHandle current()- Returns:
- the current activity in the context.
-
copy
ActivityHierarchy copy()Obtain a copy of this context. Although the context may be shared between different threads, the same instance of the context should not be.- Returns:
- the context copy.
-
equals
Overrides Object.equals Two contexts are equal if both hierarchies are identical. -
hashCode
int hashCode()Although users won't typically care what the underlying implementation of a context is, they will need to do comparisons. So, although this method is provided by Java.Object we have it here to ensure that we don't forget to implement it!
-