3 public class SenderRmi extends Sender {
6 static SenderRmi Instance = null;
9 public static SenderRmi Instance() {
10 if (Instance == null) {
11 Instance = new SenderRmi();
17 setPriority(MAX_PRIORITY);
19 buffer = new JaceBuffer();
33 // consumme the msg to send (doing a wait, so the msg is processed
38 if (msg.getReceiver() == null) {
39 // System.out.println("in jaceSend recv = null !!!!!");
41 System.out.println("Recv is null in msg of SENDER "
42 + LocalHost.Instance().getName());
45 if (msg.getReceiver().getHostStub() == null) {
46 System.out.println("SENDER : the destination is null, so I send nothing, the msg is simply lost");
50 // if there is a destinatory,
54 stub = msg.getReceiver().getHostStub();
57 // For simulating latency in network
59 Thread.sleep( site_delay ) ;
67 } catch (Exception e) {
69 .println("Can't send the messgae to "
70 + msg.getReceiver().getHostName()