Interface Network
public interface Network
Interface for the platform-specific mechanism for network access. HTTP
requests are sent asynchronously to avoid blocking the application. These
asynchronous operations return a
EventQueue that can be used to
subscribe to the response.
MultimediaLib cannot use the standard HTTP client in java.net.http,
as this is not yet available on all platforms supported by MultimediaLib.
-
Method Summary
Modifier and TypeMethodDescriptiondefault nl.colorize.util.EventQueue<Response> default nl.colorize.util.EventQueue<Response> booleanReturns true if this renderer supports peer-to-peer connections on the current platform.Opens a peer-to-peer connection.default nl.colorize.util.EventQueue<Response> default nl.colorize.util.EventQueue<Response> nl.colorize.util.EventQueue<Response>
-
Method Details
-
send
-
get
-
get
-
post
-
post
-
openPeerConnection
PeerConnection openPeerConnection()Opens a peer-to-peer connection. The protocol used for the connection depends on both the renderer and the current platform.- Throws:
UnsupportedOperationException- if peer-to-peer connections are not supported by the current platform and/or renderer.
-
isPeerToPeerSupported
boolean isPeerToPeerSupported()Returns true if this renderer supports peer-to-peer connections on the current platform. If this method returns false, trying to open peer-to-peer connections usingopenPeerConnection()will result in an exception.
-