1 23 package com.sun.enterprise.admin.event; 24 25 import java.util.ArrayList ; 26 import java.util.Iterator ; 27 import com.sun.enterprise.config.ConfigChange; 28 29 35 public class EventContext { 36 37 41 public static EventStack getEventStackFromThreadLocal() { 42 return (EventStack) _threadLocal.get(); 43 } 44 45 49 public static void setEventStackToThreadLocal(EventStack stack) { 50 _threadLocal.set(stack); 51 } 52 53 57 public static ArrayList getConfigChangeList() { 58 59 EventStack stack = getEventStackFromThreadLocal(); 60 return stack.getConfigContext().getConfigChangeList(); 61 } 62 63 69 public static void addEvent(AdminEvent event) { 70 EventStack stack = getEventStackFromThreadLocal(); 71 stack.addEvent(event); 72 } 73 74 private static ThreadLocal _threadLocal = new ThreadLocal (); 76 } 77 | Popular Tags |