Interface CreateMediaRequest
public interface CreateMediaRequest
Represents a request to create a media session, encapsulating details such as call ID, media session purpose, media
type, ingress and egress media streams, custom pipeline, and session metadata.
Implementations of this interface provide access to the request details, which are used to create a new media session.
Example usage:
CreateMediaRequest request = new CreateMediaRequestImpl.Builder()
.callId(callId)
.mediaSessionPurpose(MediaSessionPurpose.EXTERNAL_STREAM)
.mediaType(mediaType)
.addIngressMediaStream(ingressMediaStream)
.addEgressMediaStream(egressMediaStream)
.customPipeline(customPipeline)
.sessionMetadata(sessionMetadata)
.build();
Notes:
- The value for
mediaSessionPurposemust be an instance of theMediaSessionPurposeenumeration. - The value for
mediaTypeshould match the supported media types (for example, "audio" or "video"). ingressMediaStreamandegressMediaStreammust be valid stream objects constructed with their respective builders.mediaSessionIdshould not be sent from the application. If sent, it will be ignored.- Replace each variable with an appropriate value or object for your application use case.
- Author:
- Copyright (c) 2025 by Oracle, Inc. All Rights Reserved.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder interface for creating immutableCreateMediaRequestinstances. -
Method Summary
Modifier and TypeMethodDescriptionGets the call ID associated with the media session.Gets the custom pipeline configuration for the media session.Gets the list of egress media streams associated with the media session.Gets the list of ingress media streams associated with the media session.Gets the media session ID.Gets the purpose of the media session.Gets the metadata associated with the media session.voidSets the call ID associated with the media session.voidsetCustomPipeline(String customPipeline) Sets the custom pipeline configuration for the media session.voidsetEgressMediaStreams(List<EgressMediaStream> egressMediaStreams) Sets the list of egress media streams associated with the media session.voidsetIngressMediaStreams(List<IngressMediaStream> ingressMediaStreams) Sets the list of ingress media streams associated with the media session.voidsetMediaSessionId(String mediaSessionId) Sets the media session ID.voidsetMediaSessionPurpose(MediaSessionPurpose mediaSessionPurpose) Sets the purpose of the media session.voidsetSessionMetadata(SessionMetadata sessionMetadata) Sets the metadata associated with the media session.
-
Method Details
-
getMediaSessionId
String getMediaSessionId()Gets the media session ID.- Returns:
- the media session ID.
-
setMediaSessionId
Sets the media session ID.- Parameters:
mediaSessionId- the media session ID to set.
-
getCallId
String getCallId()Gets the call ID associated with the media session.- Returns:
- the call ID.
-
setCallId
Sets the call ID associated with the media session.- Parameters:
callId- the call ID to set.
-
getMediaSessionPurpose
MediaSessionPurpose getMediaSessionPurpose()Gets the purpose of the media session.- Returns:
- the media session purpose.
-
setMediaSessionPurpose
Sets the purpose of the media session.- Parameters:
mediaSessionPurpose- the media session purpose to set.
-
getIngressMediaStreams
List<IngressMediaStream> getIngressMediaStreams()Gets the list of ingress media streams associated with the media session.- Returns:
- the list of ingress media streams.
-
setIngressMediaStreams
Sets the list of ingress media streams associated with the media session.- Parameters:
ingressMediaStreams- the list of ingress media streams to set.
-
getEgressMediaStreams
List<EgressMediaStream> getEgressMediaStreams()Gets the list of egress media streams associated with the media session.- Returns:
- the list of egress media streams.
-
setEgressMediaStreams
Sets the list of egress media streams associated with the media session.- Parameters:
egressMediaStreams- the list of egress media streams to set.
-
getCustomPipeline
String getCustomPipeline()Gets the custom pipeline configuration for the media session.- Returns:
- the custom pipeline configuration, or null if not applicable.
-
setCustomPipeline
Sets the custom pipeline configuration for the media session.- Parameters:
customPipeline- the custom pipeline configuration to set.
-
getSessionMetadata
SessionMetadata getSessionMetadata()Gets the metadata associated with the media session.- Returns:
- the session metadata, or null if not applicable.
-
setSessionMetadata
Sets the metadata associated with the media session.- Parameters:
sessionMetadata- the session metadata to set.
-