public final class Contact extends AddressParametersHeader implements ContactHeader
ContactList
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
ACTION |
static String |
EXPIRES |
static String |
PROXY |
static String |
Q |
static String |
REDIRECT |
protected boolean |
wildCardFlag
wildCardFlag field.
|
address
duplicates, parameters
headerName
AND, AT, COLON, COMMA, DOT, DOUBLE_QUOTE, EQUALS, GREATER_THAN, HT, immutableClasses, indentation, LESS_THAN, LPAREN, matchExpression, NEWLINE, PERCENT, POUND, QUESTION, QUOTE, RETURN, RPAREN, SEMICOLON, SLASH, SP, STAR, stringRepresentation
NAME
ACCEPT, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ALERT_INFO, ALLOW, ALLOW_EVENTS, AUTHENTICATION_INFO, AUTHORIZATION, CALL_ID, CALL_INFO, CONTACT, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_TYPE, CSEQ, DATE, ERROR_INFO, EVENT, FROM, IN_REPLY_TO, JOIN, MAX_FORWARDS, MIME_VERSION, MIN_EXPIRES, MIN_SE, ORGANIZATION, PRIORITY, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, PROXY_REQUIRE, RACK, REASON, RECORD_ROUTE, REFERRED_BY, REPLACES, REPLY_TO, REQUIRE, RETRY_AFTER, ROUTE, RSEQ, SERVER, SESSION_EXPIRES, SIP_ETAG, SIP_IF_MATCH, SUBJECT, SUBSCRIPTION_STATE, SUPPORTED, TIMESTAMP, TO, UNSUPPORTED, USER_AGENT, VIA, WARNING, WWW_AUTHENTICATE
Constructor and Description |
---|
Contact()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clones this object.
|
protected String |
encodeBody()
Encode body of the header into a cannonical String.
|
protected StringBuilder |
encodeBody(StringBuilder buffer)
Encode the body of this header (the stuff that follows headerName).
|
boolean |
equals(Object other)
An introspection based equality predicate for SIPObjects.
|
Address |
getAddress()
get the address field.
|
ContactList |
getContactList()
get the Contact list.
|
NameValueList |
getContactParms()
get the parameters List
|
int |
getExpires()
get Expires parameter.
|
String |
getPubGruuParam() |
float |
getQValue()
get the Q-value
|
String |
getSipInstanceParam() |
String |
getTempGruuParam() |
boolean |
getWildCardFlag()
get the WildCardFlag field
|
boolean |
isWildCard()
Returns a boolean value that indicates if the contact header
has the format of Contact: *.
|
void |
removePubGruuParam()
remove the pub-gruu value from the parameter list if it exists.
|
void |
removeSipInstanceParam() |
void |
removeTempGruuParam()
remove the pub-gruu value from the parameter list if it exists.
|
void |
setAddress(Address address)
Set the address member
|
void |
setContactList(ContactList cl)
set the Contact List
|
void |
setExpires(int expiryDeltaSeconds)
Set the expiry time in seconds.
|
void |
setParameter(String name,
String value)
Set a parameter.
|
void |
setPubGruuParam(String value) |
void |
setQValue(float qValue)
set the Q-value parameter
|
void |
setSipInstanceParam(String value) |
void |
setTempGruuParam(String value) |
void |
setWildCard()
Sets a wildcard on this contact address that is "*" is assigned to the
contact header so that the header will have the format of Contact: *.
|
void |
setWildCardFlag(boolean w)
Set the wildCardFlag member
|
equalParameters, getMultiParameter, getMultiParameterNames, getMultiParameters, getMultiParameterValue, getNameValue, getParameter, getParameter, getParameterAsBoolean, getParameterAsFloat, getParameterAsHexInt, getParameterAsInt, getParameterAsLong, getParameterAsURI, getParameterNames, getParameters, getParameterValue, hasMultiParameter, hasMultiParameters, hasParameter, hasParameters, removeMultiParameter, removeMultiParameters, removeParameter, removeParameters, setMultiParameter, setMultiParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameters, setQuotedParameter
encode, encode, getHeaderName, getHeaderValue, getName, getValue, hashCode, isHeaderList, setHeaderName, toString
dbgPrint, debugDump, debugDump, match
dbgPrint, getClassFromName, getIndentation, getMatcher, isMySubclass, makeClone, merge, setMatcher, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprint
finalize, getClass, notify, notifyAll, wait, wait, wait
getParameter, getParameterNames, removeParameter
public static final String ACTION
public static final String PROXY
public static final String REDIRECT
public static final String EXPIRES
public static final String Q
protected boolean wildCardFlag
public void setParameter(String name, String value) throws ParseException
setParameter
in interface Parameters
setParameter
in class ParametersHeader
name
- - a String specifying the parameter namevalue
- - a String specifying the parameter valueParseException
- which signals that an error has been reached
unexpectedly while parsing the parameter name or value.protected String encodeBody()
protected StringBuilder encodeBody(StringBuilder buffer)
SIPHeader
encodeBody
in class ParametersHeader
public ContactList getContactList()
public boolean getWildCardFlag()
public Address getAddress()
getAddress
in interface HeaderAddress
getAddress
in class AddressParametersHeader
public NameValueList getContactParms()
public int getExpires()
getExpires
in interface ContactHeader
public void setExpires(int expiryDeltaSeconds)
setExpires
in interface ContactHeader
expiryDeltaSeconds
- exipry time.public float getQValue()
getQValue
in interface ContactHeader
public void setContactList(ContactList cl)
cl
- ContactList to setpublic void setWildCardFlag(boolean w)
w
- boolean to setpublic void setAddress(Address address)
setAddress
in interface HeaderAddress
setAddress
in class AddressParametersHeader
address
- Address to setpublic void setQValue(float qValue) throws InvalidArgumentException
setQValue
in interface ContactHeader
qValue
- float to setInvalidArgumentException
- if the q-value parameter value is not
-1
or between 0 and 1
.public Object clone()
GenericObject
clone
in interface Header
clone
in class AddressParametersHeader
public void setWildCard()
ContactHeader
setWildCard
in interface ContactHeader
public boolean isWildCard()
ContactHeader
isWildCard
in interface ContactHeader
public boolean equals(Object other)
SIPObject
equals
in interface Header
equals
in class AddressParametersHeader
other
- the other object to test against.public void removeSipInstanceParam()
public String getSipInstanceParam()
public void setSipInstanceParam(String value)
public void removePubGruuParam()
public String getPubGruuParam()
public void setPubGruuParam(String value)
public void removeTempGruuParam()
public String getTempGruuParam()
public void setTempGruuParam(String value)
Copyright © 2018. All Rights Reserved.