Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
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 JtBuilder extends JtObject { 14 15 private Object builder; 16 17 public JtBuilder () { 18 } 19 20 25 26 public void setBuilder (Object builder) { 27 this.builder = builder; 28 29 } 30 31 34 35 public Object getBuilder () { 36 return (builder); 37 } 38 39 40 41 48 49 public Object processMessage (Object event) { 50 51 String msgid = null; 52 JtMessage e = (JtMessage) event; 53 Object content; 54 Object data; 55 56 57 if (e == null) 58 return null; 59 60 msgid = (String ) e.getMsgId (); 61 62 if (msgid == null) 63 return null; 64 65 content = e.getMsgContent(); 66 68 69 if (msgid.equals ("JtREMOVE")) { 70 return (this); 71 } 72 73 if (builder == null) { 74 handleError ("JtBuilder.process: the builder attribute needs to be set"); 75 return (null); 76 } 77 78 80 return (sendMessage (builder, event)); 81 82 83 } 84 85 86 89 90 91 public static void main(String [] args) { 92 93 JtFactory factory = new JtFactory (); 94 JtBuilder builder; 95 96 97 99 builder = (JtBuilder) factory.createObject ("Jt.JtBuilder", "builder"); 100 101 103 factory.removeObject ("builder"); 104 105 106 } 107 108 109 } 110 111 112
| Popular Tags
|