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 JtBridge extends JtObject { 14 15 private Object implementor; 16 17 public JtBridge () { 18 } 19 20 25 26 public void setImplementor (Object implementor) { 27 this.implementor = implementor; 28 29 } 30 31 34 35 public Object getImplementor () { 36 return (implementor); 37 } 38 39 40 41 46 47 public Object processMessage (Object event) { 48 49 String msgid = null; 50 JtMessage e = (JtMessage) event; 51 Object content; 52 Object data; 53 54 55 if (e == null) 56 return null; 57 58 msgid = (String ) e.getMsgId (); 59 60 if (msgid == null) 61 return null; 62 63 content = e.getMsgContent(); 64 66 if (implementor == null) { 67 handleError ("JtBridge.process: the implementor attribute needs to be set"); 68 return (null); 69 } 70 71 73 return (sendMessage (implementor, event)); 74 75 84 85 } 86 87 88 91 92 93 public static void main(String [] args) { 94 95 JtFactory factory = new JtFactory (); 96 JtBridge bridge; 97 98 JtMessage msg; 99 100 102 bridge = (JtBridge) factory.createObject ("Jt.JtBridge", "bridge"); 103 104 106 factory.removeObject ("bridge"); 107 108 109 } 110 111 112 } 113 114 115
| Popular Tags
|