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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder interface for creating immutableConnectioninstances. -
Method Summary
Modifier and TypeMethodDescriptionGets the authentication token associated with the connection, used for authentication purposes.Gets the destination IP address of the connection, used for egress RTP streams.Gets the destination port number of the connection, used for egress RTP streams.Gets the MFE IP address of the connection, used for egress RTP streams.Gets the MFE port number of the connection, used for egress RTP streams.Gets the media source IP address of the connection, used for ingress RTP streams.Gets the media source port number of the connection, used for ingress RTP streams.getUrl()Gets the URL associated with the connection, used for WebSocket connections.voidsetAuthToken(String authToken) Sets the authentication token associated with the connection.voidsetDestinationIp(String destinationIp) Sets the destination IP address of the connection.voidsetDestinationPort(Integer destinationPort) Sets the destination port number of the connection.voidsetMediaReceiverIp(String mediaReceiverIp) Sets the MFE IP address of the connection.voidsetMediaReceiverPort(Integer mediaReceiverPort) Sets the MFE port number of the connection.voidsetMediaSourceIp(String mediaSourceIp) Sets the media source IP address of the connection.voidsetMediaSourcePort(Integer mediaSourcePort) Sets the media source port number of the connection.voidSets the URL associated with the connection.
-
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
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
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
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
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
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
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
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
Sets the authentication token associated with the connection.- Parameters:
authToken- the authentication token to set.
-