FileDocCategorySizeDatePackage
SessionHeader.javaAPI DocJMF 2.1.1e941Mon May 12 12:20:56 BST 2003com.sun.media.rtsp.protocol

SessionHeader

public class SessionHeader extends Object

Fields Summary
private String
sessionId
private long
timeout
Constructors Summary
public SessionHeader(String str)

        int index= str.indexOf( ';");

        if( index > 0) {
            sessionId= str.substring( 0, index);

            str= str.substring( index);

            index= str.indexOf( '=");

            String seconds= str.substring( index + 1);

            try {
                timeout= new Long( seconds).longValue();
	    } catch( NumberFormatException e) {
	        timeout= 60; // default is 60 seconds
	    }          
	} else {
            sessionId= str;
	}
    
Methods Summary
public java.lang.StringgetSessionId()

        return sessionId;
    
public longgetTimeoutValue()

        return timeout;