1 29 package jegg; 30 31 import jegg.impl.Dispatcher; 32 import jegg.impl.Priority; 33 import jegg.impl.Property; 34 import jegg.timer.Timer; 35 36 40 public interface EggContext 41 { 42 48 public String getProperty(String key); 49 50 59 public String getProperty(String key, String defValue); 60 61 66 public Property[] getProperties(); 67 68 75 public void bindToPort(final Port p); 76 77 86 public Message createMessage(final Object m); 87 88 96 public Message createMessage(final Object m, final Priority p); 97 98 106 public Timer createRepeatingTimer(final long interval_msec, 107 final long delay_msec); 108 109 114 public Timer createSingleShotTimer(final long delay_msec); 115 116 121 public Message getCurrentMessage(); 122 123 127 public Dispatcher getDispatcher(); 128 129 134 public Port getFromPort(); 135 136 140 public Object getId(); 141 142 149 public Class [] getInterface(); 150 151 155 public Port getPort(); 156 157 161 public void publishPort(final String n); 162 163 173 public void requestPort(final String n); 174 175 182 public void respond(final Object message); 183 184 192 public void respond(final Object message, final Priority priority); 193 194 205 public void respond(final Port port, final Object message); 206 207 219 public void respond(final Port port, final Object message, 220 final Priority priority); 221 222 228 public void send(final Object msg); 229 } | Popular Tags |