FileDocCategorySizeDatePackage
MonitoringThreadContext.javaAPI DocGlassfish v2 API3079Fri May 04 22:24:20 BST 2007com.sun.enterprise.admin.monitor.registry.spi.reconfig

MonitoringThreadContext

public class MonitoringThreadContext extends Object
Provides access to the thread local monitoring event. This class is used during dynamic reconfiguration of monitoring levels.
author
Nazrul Islam
since
JDK1.4

Fields Summary
private static ThreadLocal
_threadLocal
Constructors Summary
Methods Summary
public static com.sun.enterprise.admin.event.AdminEventgetEventFromThreadLocal()
Returns the monitoring event from thread local.

return
monitoring event from thread local

        return (AdminEvent) _threadLocal.get();
    
public static voidremoveEventFromThreadLocal()
Removes the monitoring event from thread local.

        // only supported in J2SE 5.0
        //_threadLocal.remove();
    
public static voidsetEventToThreadLocal(com.sun.enterprise.admin.event.AdminEvent event)
Sets the monitoring event to thread local.

param
event monitoring event

        _threadLocal.set(event);