public class MaxForwards extends SIPHeader implements MaxForwardsHeader
| Modifier and Type | Field and Description |
|---|---|
protected int |
maxForwards
maxForwards field.
|
headerNameAND, 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, stringRepresentationNAMEACCEPT, 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, EXPIRES, 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 |
|---|
MaxForwards()
Default constructor.
|
MaxForwards(int m) |
| Modifier and Type | Method and Description |
|---|---|
void |
decrementMaxForwards()
decrement MaxForwards field one by one.
|
String |
encodeBody()
Encode into a 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.
|
int |
getMaxForwards()
get the MaxForwards field.
|
boolean |
hasReachedZero()
Boolean function
|
void |
setMaxForwards(int maxForwards)
Set the maxForwards member
|
encode, encode, getHeaderName, getHeaderValue, getName, getValue, hashCode, isHeaderList, setHeaderName, toStringdbgPrint, debugDump, debugDump, matchclone, dbgPrint, getClassFromName, getIndentation, getMatcher, isMySubclass, makeClone, merge, setMatcher, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprintpublic MaxForwards()
public MaxForwards(int m)
throws InvalidArgumentException
InvalidArgumentExceptionpublic int getMaxForwards()
getMaxForwards in interface MaxForwardsHeaderpublic void setMaxForwards(int maxForwards)
throws InvalidArgumentException
setMaxForwards in interface MaxForwardsHeadermaxForwards - maxForwards parameter to setInvalidArgumentException - if the maxForwards argument is less
than 0 or greater than 255.public String encodeBody()
protected StringBuilder encodeBody(StringBuilder buffer)
SIPHeaderencodeBody in class SIPHeaderpublic boolean hasReachedZero()
public void decrementMaxForwards()
throws TooManyHopsException
decrementMaxForwards in interface MaxForwardsHeaderTooManyHopsException - if implementation cannot decrement
max-fowards i.e. max-forwards has reached zeroCopyright © 2018. All Rights Reserved.