public void sendRequest(long id, List dest_mbrs, Message msg, RspCollector coll) { Header hdr;  if(transport == null) { if(log.isWarnEnabled()) log.warn("transport is not available !"); return; }        hdr = new Header(Header.REQ, id, (coll != null), name); hdr.dest_mbrs=dest_mbrs;  if (coll != null) { if(deadlock_detection) { if(local_addr == null) { if(log.isErrorEnabled()) log.error("local address is null !"); return; } java.util.Stack new_call_stack = (call_stack != null? (java.util.Stack)call_stack.clone():new java.util.Stack()); new_call_stack.push(local_addr); hdr.callStack=new_call_stack; } addEntry(hdr.id, new RequestEntry(coll)); } msg.putHeader(name, hdr);  try { if(transport instanceof Protocol) ((Protocol)transport).passDown(new Event(Event.MSG, msg)); else if(transport instanceof Transport) ((Transport)transport).send(msg); else if(log.isErrorEnabled()) log.error("transport object has to be either a " + "Transport or a Protocol, however it is a " + transport.getClass()); } catch(Throwable e) { if(log.isWarnEnabled()) log.warn(e.toString()); }
public void sendRequest(long id, Message msg, RspCollector coll) throws Exception { sendRequest(id, null, msg, coll);
    public void sendRequest(long id, List dest_mbrs, Message msg, RspCollector coll) {        Header hdr;        if(transport == null) {            if(log.isWarnEnabled()) log.warn("transport is not available !");            return;        }        // i. Create the request correlator header and add it to the        // msg        // ii. If a reply is expected (sync call / 'coll != null'), add a        // coresponding entry in the pending requests table        // iii. If deadlock detection is enabled, set/update the call stack        // iv. Pass the msg down to the protocol layer below        hdr = new Header(Header.REQ, id, (coll != null), name);        hdr.dest_mbrs=dest_mbrs;        if (coll != null) {            if(deadlock_detection) {                if(local_addr == null) {                    if(log.isErrorEnabled()) log.error("local address is null !");                    return;                }                java.util.Stack new_call_stack = (call_stack != null?                                                  (java.util.Stack)call_stack.clone():new java.util.Stack());                new_call_stack.push(local_addr);                hdr.callStack=new_call_stack;            }            addEntry(hdr.id, new RequestEntry(coll));        }        msg.putHeader(name, hdr);        try {            if(transport instanceof Protocol)                ((Protocol)transport).passDown(new Event(Event.MSG, msg));            else if(transport instanceof Transport)                ((Transport)transport).send(msg);            else                if(log.isErrorEnabled())                    log.error("transport object has to be either a " +                              "Transport or a Protocol, however it is a " + transport.getClass());        }        catch(Throwable e) {            if(log.isWarnEnabled()) log.warn(e.toString());        }    }