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
 ActivityHandle activity(int index)
           
 ActivityHierarchy copy()
          Obtain a copy of this context.
 ActivityHandle current()
           
 boolean equals(Object obj)
          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 Detail

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

ActivityHandle activity(int index)
                        throws IndexOutOfBoundsException
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

boolean equals(Object obj)
Overrides Object.equals Two contexts are equal if both hierarchies are identical.

Overrides:
equals in class Object
Returns:
true if the two objects are the same, false otherwise.

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!

Overrides:
hashCode in class Object
Returns:
the hash value for the target.


Copyright © 2012. All Rights Reserved.