Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
Product of NIST/ITL Advanced Networking Technologies Division (ANTD). * /
  
  
  package gov.nist.javax.sip.header.extensions;
  
  
 
ReferredBy SIP Header.

Author(s):
Peter Musgrave.
Version:
JAIN-SIP-1.1 $Revision: 1.6 $ $Date: 2010-05-06 14:07:56 $
 
 public final class SessionExpires
     extends ParametersHeader implements ExtensionHeaderSessionExpiresHeader {
 
     // TODO: Need a unique UID
     private static final long serialVersionUID = 8765762413224043300L;
 
     // TODO: When the MinSEHeader is added to javax - move this there...pmusgrave
     public static final String NAME = "Session-Expires";
 
     public int expires;
 
     public static final String REFRESHER = "refresher";
    
default Constructor.
 
     public SessionExpires() {
         super();
     }

    
Gets the expires value of the SessionExpiresHeader. This expires value is relative time.

Returns:
the expires value of the ExpiresHeader.
Since:
JAIN SIP v1.1
 
     public int getExpires() {
         return ;
     }

    
Sets the relative expires value of the SessionExpiresHeader. The expires value MUST be greater than zero and MUST be less than 2**31.

Parameters:
expires - the new expires value
Throws:
javax.sip.InvalidArgumentException if supplied value is less than zero.
Since:
JAIN SIP v1.1
 
     public void setExpires(int expiresthrows InvalidArgumentException {
         if (expires < 0)
             throw new InvalidArgumentException("bad argument " + expires);
         this. = expires;
     }
 
     public void setValue(String valuethrows ParseException {
         // not implemented.
         throw new ParseException(value,0);
 
     }

    
Encode the header content into a String.

Returns:
String
 
     protected StringBuilder encodeBody(StringBuilder retval) {
 
         retval.append(Integer.toString());
 
         if (!.isEmpty()) {
     		retval.append(); 
     		.encode(retval);
     	}
         return retval;
     }
 
     public String getRefresher() {
        return .getParameter();
     }
 
     public void setRefresher(String refresher) {
        this..set(,refresher);
    }
New to GrepCode? Check out our FAQ X