Class TestMediaSession
java.lang.Object
org.jivesoftware.smackx.jingleold.media.JingleMediaSession
org.jivesoftware.smackx.jingleold.mediaimpl.test.TestMediaSession
This Class implements a complete JingleMediaSession for unit testing.
-
Constructor Summary
ConstructorDescriptionTestMediaSession
(PayloadType payloadType, TransportCandidate remote, TransportCandidate local, String locator, JingleSession jingleSession) Creates a TestMediaSession with defined payload type, remote and local candidates. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Initialize the screen share channels.void
setTransmit
(boolean active) Set transmit activity.void
For NAT Reasons this method does nothing.void
Starts transmission and for NAT Traversal reasons start receiving also.void
For NAT Reasons this method does nothing.void
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 Details
-
TestMediaSession
public TestMediaSession(PayloadType payloadType, TransportCandidate remote, TransportCandidate local, 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 Details
-
initialize
Initialize the screen share channels.- Specified by:
initialize
in classJingleMediaSession
-
startTransmit
Starts transmission and for NAT Traversal reasons start receiving also.- Specified by:
startTransmit
in classJingleMediaSession
-
setTransmit
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:
setTransmit
in classJingleMediaSession
- Parameters:
active
- active state
-
startReceive
For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf- Specified by:
startReceive
in classJingleMediaSession
-
stopTransmit
Stops transmission and for NAT Traversal reasons stop receiving also.- Specified by:
stopTransmit
in classJingleMediaSession
-
stopReceive
For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf- Specified by:
stopReceive
in classJingleMediaSession
-