membership_listener.block(); channel.blockOk();
membership_listener.block();
        public void passUp(Event evt) {            switch(evt.getType()) {                case Event.MSG:                    if(msg_listener != null) {                        msg_listener.receive((Message) evt.getArg());                    }                    break;                case Event.GET_APPLSTATE: // reply with GET_APPLSTATE_OK                    StateTransferInfo info=(StateTransferInfo)evt.getArg();                    String state_id=info.state_id;                    byte[] tmp_state=null;                    if(msg_listener != null) {                        try {                            if(msg_listener instanceof ExtendedMessageListener && state_id!=null) {                                tmp_state=((ExtendedMessageListener)msg_listener).getState(state_id);                            }                            else {                                tmp_state=msg_listener.getState();                            }                        }                        catch(Throwable t) {                            this.log.error("failed getting state from message listener (" + msg_listener + ')', t);                        }                    }                    channel.returnState(tmp_state, state_id);                    break;                case Event.GET_STATE_OK:                    if(msg_listener != null) {                        try {                            info=(StateTransferInfo)evt.getArg();                            String id=info.state_id;                            if(msg_listener instanceof ExtendedMessageListener && id!=null) {                                ((ExtendedMessageListener)msg_listener).setState(id, info.state);                            }                            else {                                msg_listener.setState(info.state);                            }                        }                        catch(ClassCastException cast_ex) {                            if(this.log.isErrorEnabled())                                this.log.error("received SetStateEvent, but argument " +                                        evt.getArg() + " is not serializable. Discarding message.");                        }                    }                    break;                case Event.STATE_TRANSFER_OUTPUTSTREAM:                    if(msg_listener != null) {                        StateTransferInfo sti=(StateTransferInfo)evt.getArg();                        OutputStream os=sti.outputStream;                        if(os != null && msg_listener instanceof ExtendedMessageListener) {                            if(sti.state_id == null)                                ((ExtendedMessageListener)msg_listener).getState(os);                            else                                ((ExtendedMessageListener)msg_listener).getState(sti.state_id, os);                        }                        return;                    }    				break;                case Event.STATE_TRANSFER_INPUTSTREAM:                    if(msg_listener != null) {                    	StateTransferInfo sti=(StateTransferInfo)evt.getArg();                        InputStream is=sti.inputStream;                        if(is!=null && msg_listener instanceof ExtendedMessageListener) {                            if(sti.state_id == null)                                ((ExtendedMessageListener)msg_listener).setState(is);                            else                                ((ExtendedMessageListener)msg_listener).setState(sti.state_id, is);                        }                    }        			break;                case Event.VIEW_CHANGE:                    View v=(View) evt.getArg();                    Vector new_mbrs=v.getMembers();                    setMembers(new_mbrs);                    if(membership_listener != null) {                        membership_listener.viewAccepted(v);                    }                    break;                case Event.SET_LOCAL_ADDRESS:                    if(log.isTraceEnabled())                        log.trace("setting local_addr (" + local_addr + ") to " + evt.getArg());                    local_addr=(Address)evt.getArg();                    break;                case Event.SUSPECT:                    if(membership_listener != null) {                        membership_listener.suspect((Address) evt.getArg());                    }                    break;                case Event.BLOCK:                    if(membership_listener != null) {                        membership_listener.block();                        channel.blockOk();                    }                    break;                case Event.UNBLOCK:                   if(membership_listener instanceof ExtendedMembershipListener) {                      ((ExtendedMembershipListener)membership_listener).unblock();                   }                   break;                }        }