Class StandardNetwork
java.lang.Object
nl.colorize.multimedialib.renderer.java2d.StandardNetwork
- All Implemented Interfaces:
Network
Sends HTTP requests using the HTTP client included as part of the Java
standard library. It also provides web socket support through the
Java-WebSocket library.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionnl.colorize.util.Subscribable
<nl.colorize.util.http.URLResponse> boolean
Returns true if this renderer supports peer-to-peer connectios on the current platform.nl.colorize.util.Subscribable
<PeerConnection> Opens a peer-to-peer connection.nl.colorize.util.Subscribable
<nl.colorize.util.http.URLResponse>
-
Constructor Details
-
StandardNetwork
public StandardNetwork()
-
-
Method Details
-
get
public nl.colorize.util.Subscribable<nl.colorize.util.http.URLResponse> get(String url, nl.colorize.util.http.Headers headers) -
post
public nl.colorize.util.Subscribable<nl.colorize.util.http.URLResponse> post(String url, nl.colorize.util.http.Headers headers, nl.colorize.util.http.PostData body) -
openPeerConnection
Description copied from interface:Network
Opens a peer-to-peer connection. The protocol used for the connection depends on both the renderer and the current platform. This also means that it is generally not possible to connect to peers on other platforms.- Specified by:
openPeerConnection
in interfaceNetwork
-
isPeerToPeerSupported
public boolean isPeerToPeerSupported()Description copied from interface:Network
Returns true if this renderer supports peer-to-peer connectios on the current platform. SeeNetwork.openPeerConnection()
.- Specified by:
isPeerToPeerSupported
in interfaceNetwork
-