Interface Connection


public interface Connection
Represents a connection between two endpoints, encapsulating media source IP and port, MFE IP and port, destination IP and port, and an authentication token.

Implementations of this interface provide access to the connection details, which are used to establish and manage media streams.

The media source IP and port , MFE IP and port are used for ingress RTP streams; while the destination IP and port are used for egress RTP streams.

The URL is used for WebSocket connections, and the authentication token is used for authentication purposes.

Example usage:


 Connection connection = new ConnectionImpl.Builder()
     .mediaSourceIp(mediaSourceIp)
     .mediaSourcePort(mediaSourcePort)
     .mediaReceiverIp(mediaReceiverIp)
     .mediaReceiverPort(mediaReceiverPort)
     .destinationIp(destinationIp)
     .destinationPort(destinationPort)
     .url(webSocketUrl)
     .authToken(authToken)
     .build();
 

Replace each variable with its desired value or object.

Author:
Copyright (c) 2025 by Oracle, Inc. All Rights Reserved.
  • Method Details

    • getMediaSourceIp

      String getMediaSourceIp()
      Gets the media source IP address of the connection, used for ingress RTP streams.
      Returns:
      the media source IP address, or null if not applicable.
    • setMediaSourceIp

      void setMediaSourceIp(String mediaSourceIp)
      Sets the media source IP address of the connection.
      Parameters:
      mediaSourceIp - the media source IP address to set.
    • getMediaSourcePort

      Integer getMediaSourcePort()
      Gets the media source port number of the connection, used for ingress RTP streams.
      Returns:
      the media source port number, or null if not applicable.
    • setMediaSourcePort

      void setMediaSourcePort(Integer mediaSourcePort)
      Sets the media source port number of the connection.
      Parameters:
      mediaSourcePort - the media source port number to set.
    • getMediaReceiverIp

      String getMediaReceiverIp()
      Gets the MFE IP address of the connection, used for egress RTP streams.
      Returns:
      the MFE IP address, or null if not applicable.
    • setMediaReceiverIp

      void setMediaReceiverIp(String mediaReceiverIp)
      Sets the MFE IP address of the connection.
      Parameters:
      mediaReceiverIp - the MFE IP address to set.
    • getMediaReceiverPort

      Integer getMediaReceiverPort()
      Gets the MFE port number of the connection, used for egress RTP streams.
      Returns:
      the MFE port number, or null if not applicable.
    • setMediaReceiverPort

      void setMediaReceiverPort(Integer mediaReceiverPort)
      Sets the MFE port number of the connection.
      Parameters:
      mediaReceiverPort - the MFE port number to set.
    • getDestinationIp

      String getDestinationIp()
      Gets the destination IP address of the connection, used for egress RTP streams.
      Returns:
      the destination IP address, or null if not applicable.
    • setDestinationIp

      void setDestinationIp(String destinationIp)
      Sets the destination IP address of the connection.
      Parameters:
      destinationIp - the destination IP address to set.
    • getDestinationPort

      Integer getDestinationPort()
      Gets the destination port number of the connection, used for egress RTP streams.
      Returns:
      the destination port number, or null if not applicable.
    • setDestinationPort

      void setDestinationPort(Integer destinationPort)
      Sets the destination port number of the connection.
      Parameters:
      destinationPort - the destination port number to set.
    • getUrl

      String getUrl()
      Gets the URL associated with the connection, used for WebSocket connections.
      Returns:
      the URL, or null if not applicable.
    • setUrl

      void setUrl(String url)
      Sets the URL associated with the connection.
      Parameters:
      url - the URL to set.
    • getAuthToken

      String getAuthToken()
      Gets the authentication token associated with the connection, used for authentication purposes.
      Returns:
      the authentication token, or null if not applicable.
    • setAuthToken

      void setAuthToken(String authToken)
      Sets the authentication token associated with the connection.
      Parameters:
      authToken - the authentication token to set.