<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Fri Dec 01 13:55:24 PST 2000 -->
<TITLE>
JMF 2.0 Proposed API Changes (01-Dec-00): Class RTPManager
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> <FONT ID="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../javax/media/rtp/RTPConnector.html"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="RTPManager.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.media.rtp</FONT>
<BR>
Class RTPManager</H2>
<PRE>
java.lang.Object
|
+--<B>javax.media.rtp.RTPManager</B>
</PRE>
<HR>
<DL>
<DT>public abstract class <B>RTPManager</B><DT>extends java.lang.Object<DT>implements javax.media.Controls</DL>
<P>
The interface implemented by the RTPManager. This is the
starting point for creating, maintaining and closing an RTP
session.
<p>
<b>1. Unicast Session</b>
<br>
The following code fragment illustrates how to create a unicast
session:
<pre>
import java.net.*;
import javax.media.rtp.*;
// create the RTP Manager
RTPManager rtpManager = RTPManager.newInstance();
// create the local endpoint for the local interface on
// any local port
IPAddress localAddress = new SessionAddress();
// initialize the RTPManager
rtpManager.initialize( localAddress);
// add the ReceiveStreamListener if you need to receive data
// and do other application specific stuff
// ...
// specify the remote endpoint of this unicast session
// the address string and port numbers in the following lines
// need to be replaced with your values.
InetAddress ipAddress = InetAddress.getByName( "168.1.2.3");
SessionAddress remoteAddress = new SessionAddress( ipAddress, 3000);
// open the connection
rtpManager.addTarget( remoteAddress);
// create a send stream for the output data source of a processor
// and start it
DataSource dataOutput = createDataSource();
SendStream sendStream = rtpSession.createSendStream( dataOutput, 1);
sendStream.start();
// send data and do other application specific stuff,
// ...
// close the connection if no longer needed.
rtpManager.removeTarget( remoteAddress, "client disconnected.");
// call dispose at the end of the life-cycle of this RTPManager so
// it is prepared to be garbage-collected.
rtpManager.dispose();
</pre>
<b>2. Multi-Unicast Session</b>
<br>
Creating multi-unicast sessions is similar to the example above. After
creating and starting the SendStream new remote endpoints may be added
by subsequent addTarget calls:
<pre>
addTarget( remoteAddress2);
addTarget( remoteAddress3);
</pre>
<b>3. Multicast Session</b>
<br>
Creating and participating in multicast sessions also works similar
to the unicast example. Instead of specifying local and remote endpoints
a multicast session address needs to be created and passed into the
initialize and addTarget calls. Everything else follows the unicast
example.
<pre>
//...
// create a multicast address for 224.1.1.0 and ports 3000/3001
IPAddress ipAddress = InetAddress.getByName( "224.1.1.0");
SessionAddress multiAddress = new SessionAddress( ipAddress, 3000);
// initialize the RTPManager
rtpManager.initialize( multiAddress);
// add the target
rtpManager.addTarget( multiAddress);
// ...
<P>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/media/rtp/RTPManager.html#RTPManager()">RTPManager</A></B>()</CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/media/rtp/RTPManager.html#addFormat(javax.media.Format, int)">addFormat</A></B>(javax.media.Format format,
int payload)</CODE>
<BR>
This method is used to add a dynamic payload to format
mapping to the RTPManager.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/media/rtp/RTPManager.html#addReceiveStreamListener(javax.media.rtp.ReceiveStreamListener)">addReceiveStreamListener</A></B>(javax.media.rtp.ReceiveStreamListener listener)</CODE>
<BR>
Adds a ReceiveStreamListener.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/media/rtp/RTPManager.html#addRemoteListener(javax.media.rtp.RemoteListener)">addRemoteListener</A></B>(javax.media.rtp.RemoteListener listener)</CODE>
<BR>
Adds a RemoteListener to the session.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/media/rtp/RTPManager.html#addSendStreamListener(javax.media.rtp.SendStreamListener)">addSendStreamListener</A></B>(javax.media.rtp.SendStreamListener listener)</CODE>
<BR>
Adds a SendStreamListener.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WID