Methods Summary |
---|
public java.lang.Object | clone()Copies the current instance.
Exception ex = null;
try {
AddressParametersHeader retval =
(AddressParametersHeader) this.getClass().newInstance();
if (this.address != null)
retval.address = (Address) this.address.clone();
if (this.parameters != null)
retval.parameters = (NameValueList) this.parameters.clone();
return retval;
} catch (InstantiationException ie) {
ex = ie;
} catch (IllegalAccessException iae) {
ex = iae;
}
if (ex != null) {
InternalErrorHandler.handleException(ex);
}
return null;
|
public java.lang.String | encodeBody()Encode the header content into a String.
if (address == null) {
throw new RuntimeException("No body!");
}
StringBuffer retval = new StringBuffer();
if (address.getAddressType() != Address.NAME_ADDR) {
retval .append("<");
}
retval .append(address.encode());
if (address.getAddressType() != Address.NAME_ADDR) {
retval .append(">");
}
retval.append(encodeWithSep());
return retval.toString();
|
public boolean | equals(java.lang.Object other)Compares obejct for equivalence.
if (! other.getClass().equals(this.getClass()))
return false;
Address otherAddress = ((AddressParametersHeader) other).getAddress();
if (otherAddress == null)
return false;
if (! otherAddress.equals(address)) {
return false;
}
if (! parameters.equals
(((AddressParametersHeader)other).parameters)) {
return false;
} else return true;
|
public Address | getAddress()Gets the Address field.
return address;
|
public java.lang.String | getDisplayName()Gets the user friendly display name.
return address.getDisplayName();
|
public HostPort | getHostPort()Gets the host and port name.
return address.getHostPort();
|
public java.lang.String | getUserAtHostPort()Gets the user at host and port name.
return address.getUserAtHostPort();
|
public java.lang.Object | getValue()Gets the address value.
return address;
|
public void | setAddress(Address address)Sets the Address field.
this.address = (Address) address;
|
public void | setHeaderValue(java.lang.String value)Sets the header value field.
Header header;
StringMsgParser smp = new StringMsgParser();
String strNewHeader = getName() + Separators.COLON + value;
try {
header = smp.parseHeader(strNewHeader);
if (header instanceof HeaderList) {
header = ((HeaderList)header).getFirst();
}
setAddress(((AddressParametersHeader)header).getAddress());
} catch (ParseException e) {
throw new IllegalArgumentException(e.toString());
}
|