1 2 3 package Jt; 4 import java.util.*; 5 import java.lang.reflect.*; 6 import java.beans.*; 7 import java.io.*; 8 9 12 13 public class JtFactory extends JtObject { 14 15 16 17 18 public JtFactory () { 19 } 20 21 22 23 29 30 public Object processMessage (Object event) { 31 32 String msgid = null; 33 JtMessage e = (JtMessage) event; 34 Object content; 35 Object data; 36 37 38 if (e == null) 39 return null; 40 41 msgid = (String ) e.getMsgId (); 42 43 if (msgid == null) 44 return null; 45 46 content = e.getMsgContent(); 47 49 return (super.processMessage (event)); 50 59 60 } 61 62 63 66 67 public static void main(String [] args) { 68 69 JtFactory factory = new JtFactory (); 70 JtObject obj; 71 72 73 75 obj = (JtObject) factory.createObject ("Jt.JtObject", "object"); 76 System.out.println (obj); 77 78 79 80 } 81 82 } 83 84 85 | Popular Tags |