| 1 package rero.ircfw.data; 2 3 import rero.ircfw.*; 4 import java.util.HashMap ; 5 6 public class FwDataHandler 7 { 8 protected DataEventAction[] responders; 9 protected InternalDataList dataList; 10 11 public FwDataHandler() 12 { 13 14 dataList = new InternalDataList(); 15 16 17 responders = new DataEventAction[6]; 18 19 responders[0] = new AddressSucker(); 20 responders[1] = new ChannelInformationTracker(); 21 responders[2] = new ChannelUserWatch(); 22 responders[3] = new MyInformationTracker(); 23 responders[4] = new ModeTracker(); 24 responders[5] = new UserHostParser(); 25 26 for (int x = 0; x < responders.length; x++) 27 { 28 responders[x].passStructures(dataList); 29 } 30 } 31 32 public InternalDataList getDataList() 33 { 34 return dataList; 35 } 36 37 public HashMap parseEvent(HashMap data) 38 { 39 for (int x = 0; x < responders.length; x++) 40 { 41 if (responders[x].isEvent(data)) 42 { 43 responders[x].process(data); 44 } 45 } 46 47 return data; 48 } 49 } 50 | Popular Tags |