NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

gov.nist.javax.sip.header
Class Reason

java.lang.Object
  extended by gov.nist.core.GenericObject
      extended by gov.nist.javax.sip.header.SIPObject
          extended by gov.nist.javax.sip.header.SIPHeader
              extended by gov.nist.javax.sip.header.ParametersHeader
                  extended by gov.nist.javax.sip.header.Reason
All Implemented Interfaces:
HeaderExt, SIPHeaderNames, Serializable, Cloneable, Header, Parameters, ReasonHeader

public class Reason
extends ParametersHeader
implements ReasonHeader

Definition of the Reason SIP Header.

Version:
1.2 $Revision: 1.7 $ $Date: 2009/07/17 18:57:35 $
Author:
M. Ranganathan
See Also:
Serialized Form

Field Summary
 String CAUSE
           
 String TEXT
           
 
Fields inherited from interface javax.sip.header.ReasonHeader
NAME
 
Fields inherited from interface gov.nist.javax.sip.header.SIPHeaderNames
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, 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 Summary
Reason()
          Set the cause. /** Creates a new instance of Reason
 
Method Summary
 int getCause()
          Get the cause token.
 String getName()
          Gets the unique string name of this Header.
 String getProtocol()
          Return the protocol.
 String getText()
          Get the text.
 void setCause(int cause)
          Set the cause.
 void setProtocol(String protocol)
          Set the protocol
 void setText(String text)
          Set the text.
 
Methods inherited from class gov.nist.javax.sip.header.ParametersHeader
clone, getNameValue, getParameter, getParameterNames, getParameters, getParameterValue, hasParameter, hasParameters, removeParameter, removeParameters, setParameter, setParameter, setParameters, setQuotedParameter
 
Methods inherited from class gov.nist.javax.sip.header.SIPHeader
encode, encode, getHeaderName, getHeaderValue, getValue, hashCode, isHeaderList, setHeaderName, toString
 
Methods inherited from class gov.nist.javax.sip.header.SIPObject
dbgPrint, debugDump, debugDump, equals, match
 
Methods inherited from class gov.nist.core.GenericObject
getClassFromName, getMatcher, isMySubclass, makeClone, merge, setMatcher
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.sip.header.Parameters
getParameter, getParameterNames, removeParameter, setParameter
 
Methods inherited from interface javax.sip.header.Header
clone, equals, hashCode, toString
 

Field Detail

TEXT

public final String TEXT
See Also:
Constant Field Values

CAUSE

public final String CAUSE
See Also:
Constant Field Values
Constructor Detail

Reason

public Reason()
Set the cause. /** Creates a new instance of Reason

Method Detail

getCause

public int getCause()
Get the cause token.

Specified by:
getCause in interface ReasonHeader
Returns:
the cause code.

setCause

public void setCause(int cause)
              throws InvalidArgumentException
Set the cause.

Specified by:
setCause in interface ReasonHeader
Parameters:
cause - - cause to set.
Throws:
InvalidArgumentException - if the cause value is less than zero.

setProtocol

public void setProtocol(String protocol)
                 throws ParseException
Set the protocol

Specified by:
setProtocol in interface ReasonHeader
Parameters:
protocol - - protocol to set.
Throws:
ParseException - which signals that an error has been reached unexpectedly while parsing the protocol value.

getProtocol

public String getProtocol()
Return the protocol.

Specified by:
getProtocol in interface ReasonHeader
Returns:
the protocol.

setText

public void setText(String text)
             throws ParseException
Set the text.

Specified by:
setText in interface ReasonHeader
Parameters:
text - -- string text to set.
Throws:
ParseException - which signals that an error has been reached unexpectedly while parsing the text value.

getText

public String getText()
Get the text.

Specified by:
getText in interface ReasonHeader
Returns:
text parameter.

getName

public String getName()
Gets the unique string name of this Header. A name constant is defined in each individual Header identifying each Header.

Specified by:
getName in interface Header
Overrides:
getName in class SIPHeader
Returns:
the name of this specific Header

NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Submit a bug report or feature request.