Class TestMediaSession
- java.lang.Object
-
- org.jivesoftware.smackx.jingleold.media.JingleMediaSession
-
- org.jivesoftware.smackx.jingleold.mediaimpl.test.TestMediaSession
-
public class TestMediaSession extends JingleMediaSession
This Class implements a complete JingleMediaSession for unit testing.
-
-
Constructor Summary
Constructors Constructor Description TestMediaSession(PayloadType payloadType, TransportCandidate remote, TransportCandidate local, java.lang.String locator, JingleSession jingleSession)Creates a TestMediaSession with defined payload type, remote and local candidates.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize()Initialize the screen share channels.voidsetTransmit(boolean active)Set transmit activity.voidstartReceive()For NAT Reasons this method does nothing.voidstartTransmit()Starts transmission and for NAT Traversal reasons start receiving also.voidstopReceive()For NAT Reasons this method does nothing.voidstopTransmit()Stops transmission and for NAT Traversal reasons stop receiving also.-
Methods inherited from class org.jivesoftware.smackx.jingleold.media.JingleMediaSession
addMediaReceivedListener, getJingleSession, getLocal, getMediaLocator, getPayloadType, getRemote, mediaReceived, removeAllMediaReceivedListener, removeMediaReceivedListener, setMediaLocator
-
-
-
-
Constructor Detail
-
TestMediaSession
public TestMediaSession(PayloadType payloadType, TransportCandidate remote, TransportCandidate local, java.lang.String locator, JingleSession jingleSession)
Creates a TestMediaSession with defined payload type, remote and local candidates.- Parameters:
payloadType- Payload of the jmfremote- the remote information. The candidate that the jmf will be sent to.local- the local information. The candidate that will receive the jmflocator- media locatorjingleSession- the jingle session.
-
-
Method Detail
-
initialize
public void initialize()
Initialize the screen share channels.- Specified by:
initializein classJingleMediaSession
-
startTransmit
public void startTransmit()
Starts transmission and for NAT Traversal reasons start receiving also.- Specified by:
startTransmitin classJingleMediaSession
-
setTransmit
public void setTransmit(boolean active)
Set transmit activity. If the active is true, the instance should transmit. If it is set to false, the instance should pause transmit.- Specified by:
setTransmitin classJingleMediaSession- Parameters:
active- active state
-
startReceive
public void startReceive()
For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf- Specified by:
startReceivein classJingleMediaSession
-
stopTransmit
public void stopTransmit()
Stops transmission and for NAT Traversal reasons stop receiving also.- Specified by:
stopTransmitin classJingleMediaSession
-
stopReceive
public void stopReceive()
For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf- Specified by:
stopReceivein classJingleMediaSession
-
-