javax.media.rtp
Class RTPSocket
java.lang.Object
|
+--javax.media.protocol.DataSource
|
+--javax.media.protocol.PushDataSource
|
+--javax.media.rtp.RTPPushDataSource
|
+--javax.media.rtp.RTPSocket
- public class RTPSocket
- extends RTPPushDataSource
- implements DataChannel
A programmer may abstract the underlying transport mechanism for
RTP control and data from the RTPSM. This is done via the RTPSocket
object. A RTPSocket datasource must be created and handed over to
Manager. The Manager will take care of creating a player for the content
type defined for this datasource. When hiding the underlying
transport protocol from the RTPSessionManager, the user is
responsible for streaming control and data to and from this
RTPSocket.
Basically, every RTPSocket is a JMF compliant datasource and is used
for streaming the data channel of an RTP session to the RTPSM.
Specifically, the RTPSocket is an instance of an RTPPushDataSource. It
also has a control counterpart RTPPushDataSource which is accessed via
methods of the DataChannel interface. Connecting, disconnecting,
starting and stopping the RTPSocket will take care of calling these
methods on the control RTPPushDataSource as well.The programmer will
still need to set the source and destination streams for
the data and control source.
- See Also:
RTPPushDataSource
,
DataChannel
Method Summary |
void |
connect()
connect yourself and the control source |
void |
disconnect()
disconnect yourself and the control source |
RTPPushDataSource |
getControlChannel()
Retrieves the control channel datasource of the object
implementing this interface. |
void |
setContentType(java.lang.String contentType)
Set your content type as well as content type of the control
source |
void |
start()
Start yourself and the control source |
void |
stop()
Stop yourself and the control source |
Methods inherited from class javax.media.rtp.RTPPushDataSource |
getContentType,
getControl,
getControls,
getDuration,
getInputStream,
getOutputStream,
getStreams,
initCheck,
isStarted,
setChild,
setInputStream,
setOutputStream |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
RTPSocket
public RTPSocket()
getControlChannel
public RTPPushDataSource getControlChannel()
- Description copied from interface: DataChannel
- Retrieves the control channel datasource of the object
implementing this interface.
- Specified by:
- getControlChannel in interface DataChannel
setContentType
public void setContentType(java.lang.String contentType)
- Set your content type as well as content type of the control
source
- Overrides:
- setContentType in class RTPPushDataSource
connect
public void connect()
throws java.io.IOException
- connect yourself and the control source
- Overrides:
- connect in class RTPPushDataSource
- Tags copied from class: DataSource
- Throws:
- java.io.IOException - Thrown if there are IO problems
when
connect
is called.
disconnect
public void disconnect()
- disconnect yourself and the control source
- Overrides:
- disconnect in class RTPPushDataSource
start
public void start()
throws java.io.IOException
- Start yourself and the control source
- Overrides:
- start in class RTPPushDataSource
- Tags copied from class: RTPPushDataSource
- Throws:
- java.io.IOException - thrown if the source has IO trouble
at startup time.
stop
public void stop()
throws java.io.IOException
- Stop yourself and the control source
- Overrides:
- stop in class RTPPushDataSource
Submit a bug or feature
Copyright 1999-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. See the Specification License for more details.
Sun, Sun Microsystems, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.