org.apache.jetspeed.aggregator
Class CurrentWorkerContext

java.lang.Object
  extended by org.apache.jetspeed.aggregator.CurrentWorkerContext

public final class CurrentWorkerContext
extends Object

Maintains a context attributes for the current Thread

Version:
$Id: $
Author:
David Sean Taylor

Field Summary
private static ThreadLocal currentWorkerContext
           
private static ThreadLocal currentWorkerContextUsed
           
 
Constructor Summary
private CurrentWorkerContext()
           
 
Method Summary
static Object getAttribute(String name)
           
static Enumeration getAttributeNames()
          Returns an Enumeration containing the names of the attributes available to this Thread.
static boolean getCurrentWorkerContextUsed()
           
static void removeAllAttributes()
          Removes all attributes from this Thread.
static void removeAttribute(String name)
          Removes an attribute from this Thread.
static void setAttribute(String name, Object o)
          Stores an attribute in this Thread.
static void setCurrentWorkerContextUsed(boolean used)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentWorkerContext

private static ThreadLocal currentWorkerContext

currentWorkerContextUsed

private static ThreadLocal currentWorkerContextUsed
Constructor Detail

CurrentWorkerContext

private CurrentWorkerContext()
Method Detail

getAttributeNames

public static Enumeration getAttributeNames()
Returns an Enumeration containing the names of the attributes available to this Thread. This method returns an empty Enumeration if the thread has no attributes available to it.


getAttribute

public static Object getAttribute(String name)
Parameters:
attrName - Locale for this Thread
Returns:
an attribute in the current Thread

setAttribute

public static void setAttribute(String name,
                                Object o)
Stores an attribute in this Thread.

Parameters:
name - - a String specifying the name of the attribute
o - - the Object to be stored

removeAttribute

public static void removeAttribute(String name)
Removes an attribute from this Thread.

Parameters:
name - - a String specifying the name of the attribute

removeAllAttributes

public static void removeAllAttributes()
Removes all attributes from this Thread.


setCurrentWorkerContextUsed

public static void setCurrentWorkerContextUsed(boolean used)

getCurrentWorkerContextUsed

public static boolean getCurrentWorkerContextUsed()


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.