public String updateHost(final String newHost) {
        validateHostName(newHost);

        String oldHost = this.host;
        this.host = newHost;

        if (!oldHost.equals(newHost)) {
            sendNotification(new AttributeChangeNotification(this, sequenceNum.incrementAndGet(), System.currentTimeMillis(), this.toString()
                                                                                                                              + " host value changed", "Host", "java.lang.String", oldHost, newHost));
        }

        return oldHost;
    }
public String updateHost ( final String newHost ) { validateHostName ( newHost ) ; String oldHost = this . host ; this . host = newHost ; if ( ! oldHost . equals ( newHost ) ) { sendNotification ( new AttributeChangeNotification ( this , sequenceNum . incrementAndGet ( ) , System . currentTimeMillis ( ) , this . toString ( ) + " host value changed" , "Host" , "java.lang.String" , oldHost , newHost ) ) ; } return oldHost ; }
Update the host value for this end point.
Will emit an AttributeChangeNotification if the value changed.

@param newHost The new (or current) host name value. If no change, no notification is sent.
@return String The previous host value