org.sourceforge.jemm.client.events
Interface Context

All Known Implementing Classes:
EntityContext, LockContext, MethodContext, SimpleContext

public interface Context

A Contextual tracker of thread execution.

Author:
Paul
See Also:
EntityContext, LockContext, MethodContext

Method Summary
 void add()
          Adds to the context the current thread.
 void add(java.lang.Thread thread)
          Adds to the context a thread.
 boolean has()
          Calls has with the Thread.currentThread().
 boolean has(java.lang.Thread t)
          Returns true if the thread has previously been added to the context otherwise false.
 void remove()
          Removes the current thread
 void remove(java.lang.Thread t)
          Removes the thread from the context.
 

Method Detail

add

void add(java.lang.Thread thread)
Adds to the context a thread. If the same thread is entered more than once then an equal number of removes is required to actually remove it.

Parameters:
thread - The thread that is

add

void add()
Adds to the context the current thread.

See Also:
add(Thread)

has

boolean has(java.lang.Thread t)
Returns true if the thread has previously been added to the context otherwise false.

Parameters:
t - The thread to look for
Returns:
True if thread has been added, false otherwise

has

boolean has()
Calls has with the Thread.currentThread().

Returns:
True if the current thread thread has been added, false otherwise

remove

void remove(java.lang.Thread t)
Removes the thread from the context. Only removes the thread if the number of calls to remove is the same as the number of times the thread was added.

Parameters:
t - The thread to remove

remove

void remove()
Removes the current thread

See Also:
remove(Thread)


Copyright © 2009. All Rights Reserved.