Class SocketFactory
- java.lang.Object
-
- com.amazonaws.kinesisvideo.socket.SocketFactory
-
public class SocketFactory extends Object
A factory class for creating TCP and SSL sockets based on a given URI. It supports both HTTP and HTTPS connections and allows filtering of IP versions.
-
-
Constructor Summary
Constructors Constructor Description SocketFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SocketcreateSocket(URI uri)Creates a socket for the given URI.SocketcreateSocket(URI uri, IPVersionFilter ipVersionFilter)Creates a socket for the given URI with an IP version filter.
-
-
-
Method Detail
-
createSocket
public Socket createSocket(URI uri)
Creates a socket for the given URI.- Parameters:
uri- The URI to connect to.- Returns:
- A new
Socketconnected to the specified URI. - Throws:
RuntimeException- If an error occurs while creating the socket.
-
createSocket
public Socket createSocket(URI uri, IPVersionFilter ipVersionFilter)
Creates a socket for the given URI with an IP version filter.- Parameters:
uri- The URI to connect to.ipVersionFilter- The filter to use for resolving the host IP.- Returns:
- A new
Socketconnected to the specified URI. - Throws:
RuntimeException- If an error occurs while creating the socket.
-
-