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 mediaSessionPurpose must be an instance of the MediaSessionPurpose enumeration.
  • The value for mediaType should match the supported media types (for example, "audio" or "video").
  • ingressMediaStream and egressMediaStream must be valid stream objects constructed with their respective builders.
  • mediaSessionId should 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.
  • Method Details

    • getMediaSessionId

      String getMediaSessionId()
      Gets the media session ID.
      Returns:
      the media session ID.
    • setMediaSessionId

      void setMediaSessionId(String mediaSessionId)
      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

      void setCallId(String callId)
      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

      void setMediaSessionPurpose(MediaSessionPurpose mediaSessionPurpose)
      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

      void setIngressMediaStreams(List<IngressMediaStream> ingressMediaStreams)
      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

      void setEgressMediaStreams(List<EgressMediaStream> egressMediaStreams)
      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

      void setCustomPipeline(String customPipeline)
      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

      void setSessionMetadata(SessionMetadata sessionMetadata)
      Sets the metadata associated with the media session.
      Parameters:
      sessionMetadata - the session metadata to set.