Fields Summary |
---|
public static Class | clazzClass handle. |
public static final String | NAMEContact header field label. |
public static final String | PARAM_EXPIRES'expires' parameter label. |
public static final String | PARAM_ACTION'action' parameter label. |
public static final String | PARAM_Q'q' parameter label. |
protected boolean | wildCardFlagwildCardFlag field. |
protected String | commentcomment field. |
Methods Summary |
---|
public java.lang.Object | clone()Clone - do a deep copy.
ContactHeader retval = new ContactHeader();
retval.wildCardFlag = this.wildCardFlag;
if (this.comment != null) retval.comment = new String(this.comment);
if (this.parameters != null)
retval.parameters = (NameValueList)
parameters.clone();
if (this.address != null) retval.address = (Address)address.clone();
return retval;
|
public java.lang.String | encodeBody()Encode this into a cannonical String.
String encoding = "";
if (wildCardFlag) {
return encoding + "*";
}
if (address != null) {
// RFC 3261, p. 223, 228
// addr-spec = SIP-URI / SIPS-URI / absoluteURI
// SIP-URI = "sip:" [ userinfo ] hostport
// uri-parameters [ headers ]
encoding += address.encode();
/*
if (address.getAddressType() == Address.NAME_ADDR) {
encoding += address.encode();
} else {
// Encoding in canonical form must have <> around address.
encoding += "<" + address.encode() + ">";
}
*/
}
encoding += encodeWithSep();
if (comment != null) {
encoding += "(" + comment + ")";
}
return encoding;
|
public java.lang.String | getAction()get the Action field.
return getParameter(PARAM_ACTION);
|
public java.lang.String | getComment()get the comment field
return comment;
|
public java.lang.String | getExpires()get Expires field
return getParameter(PARAM_EXPIRES);
|
public java.lang.String | getQValue()get the Q-value
return getParameter(PARAM_Q);
|
public java.lang.Object | getValue()get the address field.
return address;
|
public boolean | getWildCardFlag()get the WildCardFlag field
return wildCardFlag;
|
public boolean | hasQValue()Returns true if Q-value is present.
return hasParameter(PARAM_Q);
|
public void | setAddress(Address newAddress)Sets the address member.
if (newAddress != null) {
address = newAddress;
}
|
public void | setComment(java.lang.String newComment)Sets the comment member.
if (newComment != null) {
comment = newComment;
}
|
public void | setExpires(java.lang.String expires)Set the expiry time in seconds.
setParameter(PARAM_EXPIRES, expires);
|
public void | setExpires(int expires)Set the expiry time in seconds.
setParameter(PARAM_EXPIRES, new Integer(expires).toString());
|
public void | setWildCardFlag(boolean w)Sets the wildCardFlag member.
wildCardFlag = w;
|