Class StandardNetwork

java.lang.Object
nl.colorize.multimedialib.renderer.java2d.StandardNetwork
All Implemented Interfaces:
Network

public class StandardNetwork extends Object implements 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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    nl.colorize.util.Subscribable<nl.colorize.util.http.URLResponse>
    get(String url, nl.colorize.util.http.Headers headers)
     
    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>
    post(String url, nl.colorize.util.http.Headers headers, nl.colorize.util.http.PostData body)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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)
      Specified by:
      get in interface Network
    • 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)
      Specified by:
      post in interface Network
    • openPeerConnection

      public nl.colorize.util.Subscribable<PeerConnection> 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 interface Network
    • isPeerToPeerSupported

      public boolean isPeerToPeerSupported()
      Description copied from interface: Network
      Returns true if this renderer supports peer-to-peer connectios on the current platform. See Network.openPeerConnection().
      Specified by:
      isPeerToPeerSupported in interface Network