initial_members.notify();
initial_members.notifyAll();
    public void up(Event evt) {        Message msg, rsp_msg;        Object obj;        PingHeader hdr, rsp_hdr;        PingRsp rsp;        Address coord;        switch(evt.getType()) {            case Event.MSG:                msg=(Message) evt.getArg();                obj=msg.getHeader(getName());                if(obj == null || !(obj instanceof PingHeader)) {                    passUp(evt);                    return;                }                hdr=(PingHeader) msg.removeHeader(getName());                switch(hdr.type) {                    case PingHeader.GET_MBRS_REQ:   // return Rsp(local_addr, coord)                        if(!is_server) {                            //System.err.println("TCPPING.up(GET_MBRS_REQ): did not return a response " +                            //	       "as I'm not a server yet !");                            return;                        }                        synchronized(members) {                            coord=members.size() > 0 ? (Address) members.firstElement() : local_addr;                        }                        rsp_msg=new Message(msg.getSrc(), null, null);                        rsp_hdr=new PingHeader(PingHeader.GET_MBRS_RSP, new PingRsp(local_addr, coord));                        rsp_msg.putHeader(getName(), rsp_hdr);                        passDown(new Event(Event.MSG, rsp_msg));                        return;                    case PingHeader.GET_MBRS_RSP:   // add response to vector and notify waiting thread                        rsp=(PingRsp) hdr.arg;                        synchronized(initial_members) {                            initial_members.addElement(rsp);                            initial_members.notify();                        }                        return;                    default:                        if(log.isWarnEnabled()) log.warn("got TCPPING header with unknown type (" + hdr.type + ')');                        return;                }            case Event.SET_LOCAL_ADDRESS:                passUp(evt);                local_addr=(Address)evt.getArg();                // Add own address to initial_hosts if not present: we must always be able to ping ourself !                if(initial_hosts != null && local_addr != null) {                    if(!initial_hosts.contains(local_addr)) {                        if(log.isDebugEnabled()) log.debug("[SET_LOCAL_ADDRESS]: adding my own address (" + local_addr +                                                           ") to initial_hosts; initial_hosts=" + initial_hosts);                        initial_hosts.add(local_addr);                    }                }                break;            default:                passUp(evt);            // Pass up to the layer above us                break;        }    }