this.observer=observer; observer.setProtocol(this); if(up_handler != null) up_handler.setObserver(observer); if(down_handler != null) down_handler.setObserver(observer); }
this.observer = observer; observer.setProtocol(this); if (up_handler != null) { up_handler.setObserver(observer); } if (down_handler != null) { down_handler.setObserver(observer); } }
    public void setObserver(ProtocolObserver observer) {        this.observer=observer;        observer.setProtocol(this);        if(up_handler != null)            up_handler.setObserver(observer);        if(down_handler != null)            down_handler.setObserver(observer);    }