org.red5.server.net.rtsp
Class RTSPSession

java.lang.Object
  extended by org.red5.server.net.rtsp.RTSPSession

public class RTSPSession
extends Object

RTSP is primarily a connection-less protocol, that means that RTSP request can be made over multiples TCP connections. To identify such a "session", a 64-bit identifier is used.

Author:
Matteo Merli (matteo.merli@gmail.com)

Constructor Summary
protected RTSPSession(String sessionId)
           
 
Method Summary
 void addTrack(Track track)
          Adds a new track to the session
static void close(long id)
          Close the session and removes it.
static void close(String id)
          Close a session and remove resources.
static RTSPSession create()
           
static RTSPSession create(String sessionId)
          Creates a new empty RTSPSession and stores it.
static RTSPSession get(String id)
          Access an opened session.
 String getId()
           
 Track getTrack(String control)
           
 int getTracksCount()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTSPSession

protected RTSPSession(String sessionId)
Method Detail

create

public static RTSPSession create(String sessionId)
Creates a new empty RTSPSession and stores it.

Parameters:
sessionId - Session identifier
Returns:
The newly created session

create

public static RTSPSession create()
Returns:
a new RTSPSession with a new random ID

get

public static RTSPSession get(String id)
Access an opened session.

Parameters:
id - Session identifier
Returns:
The RTSPSession identified by id or null if not present

close

public static void close(String id)
Close a session and remove resources.

Parameters:
id - Session identifier

close

public static void close(long id)
Close the session and removes it.

Parameters:
id - the session ID

getId

public String getId()
Returns:
the session ID

getTrack

public Track getTrack(String control)
Parameters:
control - the key to access the track
Returns:
the track

getTracksCount

public int getTracksCount()
Returns:
the number of track contained in this sessions

addTrack

public void addTrack(Track track)
Adds a new track to the session

Parameters:
track - a Track object


Copyright © 2006-2009 The Red5 Project