if(log.isInfoEnabled()) log.info("received LEAVE_REQ " + hdr + " from " + msg.getSrc());
if(log.isDebugEnabled()) log.debug("received LEAVE_REQ " + hdr + " from " + msg.getSrc());
    public void up(Event evt) {        Object obj;        Message msg;        GmsHeader hdr;        MergeData merge_data;        switch(evt.getType()) {            case Event.MSG:                msg=(Message)evt.getArg();                obj=msg.getHeader(getName());                if(obj == null || !(obj instanceof GmsHeader))                    break;                hdr=(GmsHeader)msg.removeHeader(getName());                switch(hdr.type) {                    case GmsHeader.JOIN_REQ:                        handleJoinRequest(hdr.mbr);                        break;                    case GmsHeader.JOIN_RSP:                        impl.handleJoinResponse(hdr.join_rsp);                        break;                    case GmsHeader.LEAVE_REQ:                        if(log.isInfoEnabled()) log.info("received LEAVE_REQ " + hdr + " from " + msg.getSrc());                        if(hdr.mbr == null) {                            if(log.isErrorEnabled()) log.error("LEAVE_REQ's mbr field is null");                            return;                        }                        sendLeaveResponse(hdr.mbr);                        impl.handleLeave(hdr.mbr, false);                        break;                    case GmsHeader.LEAVE_RSP:                        impl.handleLeaveResponse();                        break;                    case GmsHeader.VIEW:                        if(hdr.view == null) {                            if(log.isErrorEnabled()) log.error("[VIEW]: view == null");                            return;                        }                        impl.handleViewChange(hdr.view, hdr.digest);                        break;                    case GmsHeader.MERGE_REQ:                        impl.handleMergeRequest(msg.getSrc(), hdr.merge_id);                        break;                    case GmsHeader.MERGE_RSP:                        merge_data=new MergeData(msg.getSrc(), hdr.view, hdr.digest);                        merge_data.merge_rejected=hdr.merge_rejected;                        impl.handleMergeResponse(merge_data, hdr.merge_id);                        break;                    case GmsHeader.INSTALL_MERGE_VIEW:                        impl.handleMergeView(new MergeData(msg.getSrc(), hdr.view, hdr.digest), hdr.merge_id);                        break;                    case GmsHeader.CANCEL_MERGE:                        impl.handleMergeCancelled(hdr.merge_id);                        break;                    default:                        if(log.isErrorEnabled()) log.error("GmsHeader with type=" + hdr.type + " not known");                }                return;  // don't pass up            case Event.CONNECT_OK:     // sent by someone else, but WE are responsible for sending this !            case Event.DISCONNECT_OK:  // dito (e.g. sent by UDP layer). Don't send up the stack                return;            case Event.SET_LOCAL_ADDRESS:                local_addr=(Address)evt.getArg();                if(print_local_addr) {                    System.out.println("\n-------------------------------------------------------\n" +                                       "GMS: address is " + local_addr +                                       "\n-------------------------------------------------------");                }                break;                               // pass up            case Event.SUSPECT:                impl.suspect((Address)evt.getArg());                break;                               // pass up            case Event.UNSUSPECT:                impl.unsuspect((Address)evt.getArg());                return;                              // discard            case Event.MERGE:                impl.merge((Vector)evt.getArg());                return;                              // don't pass up        }        if(impl.handleUpEvent(evt))            passUp(evt);    }