⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sessionmanager.html

📁 JMF原版英文说明文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
 InitSession called a second time or thereafter will return without doing anything, since the session had already been initialized. If parameters to initSession() are different from before, the user must note that  the new parameters will ignored as a result of no action being performed. In this case, the return value is -1 indicating no action was taken since initSession had previously been called <P><DT><B>Returns:</B><DD>Returns 0 if initSession was executed succesfully and -1 initSession was previously executed.<DT><B>Throws:</B><DD><A HREF="../../../javax/media/rtp/InvalidSessionAddressException.html">InvalidSessionAddressException</A> - This exception is thrown if the local control and data addresses given in parameter localAddress do not belong to one of the localhost interfaces.</DL></DD></DL><HR><A NAME="initSession(javax.media.rtp.SessionAddress, javax.media.rtp.rtcp.SourceDescription[], double, double)"><!-- --></A><H3>initSession</H3><PRE>public int <B>initSession</B>(<A HREF="../../../javax/media/rtp/SessionAddress.html">SessionAddress</A>&nbsp;localAddress,                       <A HREF="../../../javax/media/rtp/rtcp/SourceDescription.html">SourceDescription</A>[]&nbsp;defaultUserDesc,                       double&nbsp;rtcp_bw_fraction,                       double&nbsp;rtcp_sender_bw_fraction)                throws <A HREF="../../../javax/media/rtp/InvalidSessionAddressException.html">InvalidSessionAddressException</A></PRE><DL><DD>This form of initSession is to be used when the SSRC is to be generated by the RTPSM. In this case, the client allows the underlying implementation to choose an  appropriate SSRC, and the SSRC chosen can be retrieved with getDefaultSSRC(). <P> InitSession called a second time or thereafter will return without doing anything, since the session had already been initialized. If parameters to initSession() are different from before, the user must note that  the new parameters will ignored as a result of no action being performed. In this case,  The return value is -1 indicating no action was taken since initSession had previously been called <P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Returns 0 if initSession was executed succesfully and -1 initSession was previously executed.<DT><B>Throws:</B><DD><A HREF="../../../javax/media/rtp/InvalidSessionAddressException.html">InvalidSessionAddressException</A> - This exception is thrown if the local control and data addresses given in parameter localAddress do not belong to one of the localhost interfaces.</DL></DD></DL><HR><A NAME="startSession(javax.media.rtp.SessionAddress, int, javax.media.rtp.EncryptionInfo)"><!-- --></A><H3>startSession</H3><PRE>public int <B>startSession</B>(<A HREF="../../../javax/media/rtp/SessionAddress.html">SessionAddress</A>&nbsp;destAddress,                        int&nbsp;mcastScope,                        <A HREF="../../../javax/media/rtp/EncryptionInfo.html">EncryptionInfo</A>&nbsp;encryptionInfo)                 throws java.io.IOException,                        <A HREF="../../../javax/media/rtp/InvalidSessionAddressException.html">InvalidSessionAddressException</A></PRE><DL><DD>This method starts the session, causing RTCP reports to generated and  callbacks to be made through the SessionListener  interface. This method must be called after session initialization and prior to the creation of any streams on a session.  A valid destination address is required even for sessions that will have no sending streams so that RTCP control  messages can be sent.  <P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>destAddress</CODE> - The RTP session address which is defined as the address,port combination pair to which data and control  packets  will be sent.  As opposed to the localAddress parameter  specified in initSession,some portions  of this  SessionAddress *must* be specified.This is the Session Address and is defined in the RFC as one network address and a port pair for RTP/RTCP. The RTP ports is even and one lower than the RTCP port.Either of the RTP or RTCP address, port pair must be supplied in destAddress parameter. Note: For multicast sessions, this address will be the multicast address to which data will  be sent. In case of a UNICAST session, you can enter either the IP address of the receiver of data i.e. address to which data is destined OR the IP address of the sender i.e. address to which control packets are to be sent. For broadcast session, this address will be the subnet broadcast address.<DD><CODE>mcastScope</CODE> - If the destination address specified is an IP multicast  address, this value specifies the ttl of outgoing packets on that address. <P><DD><CODE>encryptionInfo</CODE> - Encryption information for this session. <P><DT><B>Returns:</B><DD>Returns 0 if startSession was executed succesfully and -1 startSession was previously executed.<DT><B>Throws:</B><DD>java.io.IOException - This exception is thrown if the local control and data sockets cannot be opened or if the mulitcast group cannot be joined.<DD><A HREF="../../../javax/media/rtp/InvalidSessionAddressException.html">InvalidSessionAddressException</A> - This exception is thrown if the Session Address is incomplete in that it cannot be completely deciphered.</DL></DD></DL><HR><A NAME="startSession(javax.media.rtp.SessionAddress, javax.media.rtp.SessionAddress, javax.media.rtp.SessionAddress, javax.media.rtp.EncryptionInfo)"><!-- --></A><H3>startSession</H3><PRE>public int <B>startSession</B>(<A HREF="../../../javax/media/rtp/SessionAddress.html">SessionAddress</A>&nbsp;localReceiverAddress,                        <A HREF="../../../javax/media/rtp/SessionAddress.html">SessionAddress</A>&nbsp;localSenderAddress,                        <A HREF="../../../javax/media/rtp/SessionAddress.html">SessionAddress</A>&nbsp;remoteReceiverAddress,                        <A HREF="../../../javax/media/rtp/EncryptionInfo.html">EncryptionInfo</A>&nbsp;encryptionInfo)                 throws java.io.IOException,                        <A HREF="../../../javax/media/rtp/InvalidSessionAddressException.html">InvalidSessionAddressException</A></PRE><DL><DD>This method may be used instead of startSession() above, but only in case of UNICAST sessions. It allows a user to specify distinct port pairs for the two end points of a unicast session only. Note: This feature is not in RFC 1889, but has been added in a later RTP draft.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>localReceiverAddress</CODE> - specifies the RTP session address of the local end point of this unicast session. i.e. the IP address, data/ control port of the local host<DD><CODE>localSenderAddress</CODE> - specifies the local RTP session address that is used for sending out RTP and RTCP packets.<DD><CODE>remoteReceiverAddress</CODE> - The RTP session address of the remote end point of this unicast session. i.e. the IP address,port of the remote host<DT><B>Returns:</B><DD>Returns 0 if startSession was executed succesfully and -1 startSession was previously executed.<DT><B>Throws:</B><DD>java.io.IOException - This exception is thrown if the local control and data sockets cannot be opened.<DD><A HREF="../../../javax/media/rtp/InvalidSessionAddressException.html">InvalidSessionAddressException</A> - This exception is thrown if the Session Address is incomplete in that it cannot be completely deciphered or the addresses supplied are NOT unicast IP addresses.</DL></DD></DL><HR><A NAME="addSessionListener(javax.media.rtp.SessionListener)"><!-- --></A><H3>addSessionListener</H3><PRE>public void <B>addSessionListener</B>(<A HREF="../../../javax/media/rtp/SessionListener.html">SessionListener</A>&nbsp;listener)</PRE><DL><DD>Adds a SessionListener. A SessionListener will receive events that pertain to the Session as a whole. Currently, these include the NewParticipantEvent and LocalCollisionEvent. Events are notified in the update(SessionEvent) method which must be implemented by all SessionListeners.<DD><DL></DL></DD></DL><HR><A NAME="addRemoteListener(javax.media.rtp.RemoteListener)"><!-- --></A><H3>addRemoteListener</H3><PRE>public void <B>addRemoteListener</B>(<A HREF="../../../javax/media/rtp/RemoteListener.html">RemoteListener</A>&nbsp;listener)</PRE><DL><DD>Adds a RTPRemoteListener to the session. This listener listens to all remote RTP events. Currently, these include ReceiverReportEvent, ReceiveSenderReportEvent and RemoteCollisionEvent. This interface would be usefuly for an RTCP monitor that does not wish to receive any particular stream transitionEvents but just wants to monitor the session quality and statistics.<DD><DL></DL></DD></DL><HR><A NAME="addReceiveStreamListener(javax.media.rtp.ReceiveStreamListener)"><!-- --></A><H3>addReceiveStreamListener</H3><PRE>public void <B>addReceiveStreamListener</B>(<A HREF="../../../javax/media/rtp/ReceiveStreamListener.html">ReceiveStreamListener</A>&nbsp;listener)</PRE><DL><DD>Adds a ReceiveStreamListener. This listener listens to all the events that notify state transitions for a particular ReceiveStream.<DD><DL></DL></DD></DL><HR><A NAME="addSendStreamListener(javax.media.rtp.SendStreamListener)"><!-- --></A><H3>addSendStreamListener</H3><PRE>public void <B>addSendStreamListener</B>(<A HREF="../../../javax/media/rtp/SendStreamListener.html">SendStreamListener</A>&nbsp;listener)</PRE><DL><DD>Adds a SendStreamListener. This listener listens to all the events that notify state transitions for a particular SendStream.<DD><DL></DL></DD></DL><HR><A NAME="removeSessionListener(javax.media.rtp.SessionListener)"><!-- --></A><H3>removeSessionListener</H3><PRE>public void <B>removeSessionListener</B>(<A HREF="../../../javax/media/rtp/SessionListener.html">SessionListener</A>&nbsp;listener)</PRE><DL><DD>removes a SessionListener<DD><DL></DL></DD></DL><HR><A NAME="removeRemoteListener(javax.media.rtp.RemoteListener)"><!-- --></A><H3>removeRemoteListener</H3><PRE>public void <B>removeRemoteListener</B>(<A HREF="../../../javax/media/rtp/RemoteListener.html">RemoteListener</A>&nbsp;listener)</PRE><DL><DD>removes a RTPRemoteListener<DD><DL></DL></DD></DL><HR><A NAME="removeReceiveStreamListener(javax.media.rtp.ReceiveStreamListener)"><!-- --></A><H3>removeReceiveStreamListener</H3><PRE>public void <B>removeReceiveStreamListener</B>(<A HREF="../../../javax/media/rtp/ReceiveStreamListener.html">ReceiveStreamListener</A>&nbsp;listener)</PRE><DL><DD>removes a ReceiveStreamListener<DD><DL></DL></DD></DL><HR><A NAME="removeSendStreamListener(javax.media.rtp.SendStreamListener)"><!-- --></A><H3>removeSendStreamListener</H3><PRE>public void <B>removeSendStreamListener</B>(<A HREF="../../../javax/media/rtp/SendStreamListener.html">SendStreamListener</A>&nbsp;listener)</PRE><DL><DD>removes a SendStreamListener<DD><DL></DL></DD></DL><HR><A NAME="getDefaultSSRC()"><!-- --></A><H3>getDefaultSSRC</H3><PRE>public long <B>getDefaultSSRC</B>()</PRE><DL><DD>Returns the default SSRC for this session.  Returns SSRC_UNSPEC if the  session has not yet been initialized. <P><DD><DL></DL></DD></DL><HR><A NAME="getRemoteParticipants()"><!-- --></A><H3>getRemoteParticipants</H3><PRE>public java.util.Vector <B>getRemoteParticipants</B>()</PRE><DL><DD>Returns a Vector of all the remote participants in the session.This vector is simply a snapshot of the current state in the SessionManager.The SessionListener interface can be used to get notified of additional participants for the Session. <P><DD><DL></DL></DD></DL><HR><A NAME="getActiveParticipants()"><!-- --></A><H3>getActiveParticipants</H3><PRE>public java.util.Vector <B>getActiveParticipants</B>()</PRE><DL><DD>Returns a vector of all the active (data sending) participants. These participants may be remote and/or the local participant.<DD><DL></DL></DD></DL><HR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -