/** * Set the host part of this ViaHeader to the newly supplied <code>host</code> * parameter. * * @return host - the new interger value of the host of this ViaHeader * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the host value. */ func (this *Via) SetHostFromString(host string) (ParseException error) { if this.sentBy == nil { this.sentBy = core.NewHostPort() } //try { h := core.NewHost(host) this.sentBy.SetHost(h) //} //catch(Exception e) { // throw new NullPointerException(" host parameter is null"); //} return nil }
/** * Set the port part of this ViaHeader to the newly supplied <code>port</code> * parameter. * * @param port - the new interger value of the port of this ViaHeader */ func (this *Via) SetPort(port int) { if this.sentBy == nil { this.sentBy = core.NewHostPort() } this.sentBy.SetPort(port) }
/** * Set the port. * @param port int to set */ func (this *Authority) SetPort(port int) { if this.hostPort == nil { this.hostPort = core.NewHostPort() } this.hostPort.SetPort(port) }
/** set the Host of the Via Header * @param host String to set */ func (this *Via) SetHost(host *core.Host) { if this.sentBy == nil { this.sentBy = core.NewHostPort() } this.sentBy.SetHost(host) }
/** * set the host. * @param host Host to set */ func (this *Authority) SetHost(host *core.Host) { if this.hostPort == nil { this.hostPort = core.NewHostPort() } this.hostPort.SetHost(host) }