if(log.isTraceEnabled()) log.trace("message is " + msg + ", headers are " + msg.getHeaders());
if(log.isTraceEnabled()) { StringBuffer sb=new StringBuffer("message is "); sb.append(msg).append(", headers are ").append(msg.getHeaders()); log.trace(sb.toString()); }
    void handleMessage(Message msg) {        Event     evt;        UdpHeader hdr;        Address   dst=msg.getDest();        if(dst == null)            dst=mcast_addr;        // discard my own multicast loopback copy        if(loopback) {            Address src=msg.getSrc();            if((dst == null || (dst != null && dst.isMulticastAddress())) && src != null && local_addr.equals(src)) {                if(log.isTraceEnabled())                    log.trace("discarded own loopback multicast packet");                return;            }        }        evt=new Event(Event.MSG, msg);        if(log.isTraceEnabled())            log.trace("message is " + msg + ", headers are " + msg.getHeaders());        /* Because Protocol.up() is never called by this bottommost layer, we call up() directly in the observer.        * This allows e.g. PerfObserver to get the time of reception of a message */        if(observer != null)            observer.up(evt, up_queue.size());        hdr=(UdpHeader)msg.getHeader(name); // replaced removeHeader() with getHeader()        if(hdr != null) {            /* Discard all messages destined for a channel with a different name */            String ch_name=hdr.channel_name;            // Discard if message's group name is not the same as our group name unless the            // message is a diagnosis message (special group name DIAG_GROUP)            if(ch_name != null && channel_name != null && !channel_name.equals(ch_name) &&                    !ch_name.equals(Util.DIAG_GROUP)) {                if(log.isWarnEnabled()) log.warn("discarded message from different group (" +                        ch_name + "). Sender was " + msg.getSrc());                return;            }        }        else {            if(log.isErrorEnabled()) log.error("message does not have a UDP header");        }        passUp(evt);    }