/** * Get the host from the topmost via header. * * @return the string representation of the host from the topmost via header. */ public String getViaHost() { Via via = (Via) this.getViaHeaders().getFirst(); return via.getHost(); }
public boolean equals(Object other) { if (other==this) return true; if (other instanceof ViaHeader) { final ViaHeader o = (ViaHeader) other; return getProtocol().equalsIgnoreCase( o.getProtocol() ) && getTransport().equalsIgnoreCase( o.getTransport() ) && getHost().equalsIgnoreCase( o.getHost() ) && getPort() == o.getPort() && equalParameters( o ); } return false; }
host = via.getHost();