FileDocCategorySizeDatePackage
EventContext.javaAPI DocGlassfish v2 API3412Fri May 04 22:33:34 BST 2007com.sun.enterprise.admin.event

EventContext

public class EventContext extends Object
Provides access to the thread local event stack.
author
Nazrul Islam
since
JDK1.4

Fields Summary
private static InheritableThreadLocal
_threadLocal
Constructors Summary
Methods Summary
public static voidaddEvent(AdminEvent event)
Adds an event to the stack. The newly added event will be sent to the target destination.

param
event an event

        EventStack stack = getEventStackFromThreadLocal();
        stack.addEvent(event);
    
public static java.util.ArrayListgetConfigChangeList()
Returns the config changes from config.

return
list of config changes


        EventStack stack = getEventStackFromThreadLocal();
        return stack.getConfigContext().getConfigChangeList();
    
public static EventStackgetEventStackFromThreadLocal()
Returns the event stack from thread local.

return
event stack from thread local

        return (EventStack) _threadLocal.get();
    
public static voidsetEventStackToThreadLocal(EventStack stack)
Sets the event stack to thread local.

param
stack event stack info

        _threadLocal.set(stack);