Interface NegotiatedSDP
public interface NegotiatedSDP
Represents a negotiated SDP (Session Description Protocol) media description, encapsulating its media type, media
direction, connection details, and negotiated codecs.
Implementations of this interface provide access to the negotiated SDP media description's properties, which are used to configure and manage the media stream.
Example usage:
NegotiatedSDP negotiatedSDP = new NegotiatedSDPImpl.Builder()
.mediaType(MediaType.AUDIO)
.mediaDirection(MediaDirection.SENDONLY)
.connection(connection)
.negotiatedCodecs(List.of(codec))
.build();
Notes:
- The value for
mediaTypemust be an instance of theMediaTypeenumeration. - The value for
mediaDirectionmust be an instance of theMediaDirectionenumeration. - The
connectionobject in a negotiated SDP must include themediaReceiverIpandmediaReceiverPort.
- Author:
- Copyright (c) 2025 by Oracle, Inc. All Rights Reserved.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder interface for creating immutableNegotiatedSDPinstances. -
Method Summary
Modifier and TypeMethodDescriptionGets the connection details for the negotiated SDP media description.Gets the media direction of the negotiated SDP media description.Gets the media type of the negotiated SDP media description.Gets the list of codecs negotiated by the SDP media description.voidsetConnection(Connection connection) Sets the connection details for the negotiated SDP media description.voidsetMediaDirection(MediaDirection mediaDirection) Sets the media direction of the negotiated SDP media description.voidsetMediaType(MediaType mediaType) Sets the media type of the negotiated SDP media description.voidsetNegotiatedCodecs(List<Codec> negotiatedCodecs) Sets the list of codecs negotiated by the SDP media description.
-
Method Details
-
getMediaType
MediaType getMediaType()Gets the media type of the negotiated SDP media description.- Returns:
- the media type.
-
setMediaType
Sets the media type of the negotiated SDP media description.- Parameters:
mediaType- the media type to set.
-
getMediaDirection
MediaDirection getMediaDirection()Gets the media direction of the negotiated SDP media description.- Returns:
- the media direction.
-
setMediaDirection
Sets the media direction of the negotiated SDP media description.- Parameters:
mediaDirection- the media direction to set.
-
getConnection
Connection getConnection()Gets the connection details for the negotiated SDP media description.- Returns:
- the connection details.
-
setConnection
Sets the connection details for the negotiated SDP media description.- Parameters:
connection- the connection details to set.
-
getNegotiatedCodecs
Gets the list of codecs negotiated by the SDP media description.- Returns:
- the list of negotiated codecs.
-
setNegotiatedCodecs
Sets the list of codecs negotiated by the SDP media description.- Parameters:
negotiatedCodecs- the negotiated codecs to set.
-