Class DataTransportHttp


  • public class DataTransportHttp
    extends DataTransport
    HTTP data transport. TODO: Maybe make it possible for the application to check the TLS root certificate via DataTransportOptions
    • Constructor Detail

    • Method Detail

      • getHost

        @NonNull
        public java.lang.String getHost()
      • getPort

        public int getPort()
      • getPath

        @NonNull
        public java.lang.String getPath()
      • getUseTls

        public boolean getUseTls()
      • setHost

        public void setHost​(@NonNull
                            java.lang.String host)
      • setPort

        public void setPort​(int port)
      • setPath

        public void setPath​(@NonNull
                            java.lang.String path)
      • setUseTls

        public void setUseTls​(boolean useTls)
      • getConnectionMethod

        @NonNull
        public ConnectionMethod getConnectionMethod()
        Description copied from class: DataTransport
        Returns a ConnectionMethod instance that can be used to connect to this transport.

        This is used for listening transports where the address to listen on is not known until the connection has been set up for example if dynamic TCP port assignments are used or cloud relays.

        For most data transports this will return the same ConnectionMethod instance that was passed at construction time. However for some transports where the address to listen on is not known until the connection have been set up (for example dynamic TCP listening port assignments or when a cloud relay is in use) it will differ.

        This cannot be called until the DataTransport.Listener.onConnectionMethodReady() callback has been fired.

        Specified by:
        getConnectionMethod in class DataTransport
        Returns:
        A ConnectionMethod-derived instance.