Class Endpoint

    • Method Detail

      • getURI

        public URI getURI()
        Returns the URI of this Endpoint.
        Returns:
        a URI contained in this Endpoint
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getHost

        public String getHost()
        Returns the host component of this endpoint.
        Returns:
        The host component of this URI, or null if the host is undefined
      • getPort

        public int getPort()
        Returns the port of this endpoint.
        Returns:
        The port of this endpoint
      • isSecureEndpoint

        public boolean isSecureEndpoint()
        Returns true if endpoint uses WebSocket Secure protocol. Otherwise false.
        Returns:
        true if endpoint uses WebSocket Secure protocol. Otherwise false
      • compareTo

        public int compareTo​(Endpoint that)
        Compares this Endpoint to another object, which must be a Endpoint.
        Specified by:
        compareTo in interface Comparable<Endpoint>
        Parameters:
        that - The object to which this Endpoint is to be compared
        Returns:
        A negative integer, zero, or a positive integer as this Endpoint is less than, equal to, or greater than the given Endpoint
      • of

        public static Endpoint of​(URI endpoint)
        Converts an URI into Endpoint.
        Parameters:
        endpoint - a drasyl node endpoint represented as URI
        Returns:
        Endpoint converted from endpoint
        Throws:
        NullPointerException - if endpoint is null
        IllegalArgumentException - if endpoint is an invalid Endpoint
      • of

        public static Endpoint of​(String endpoint)
        Converts a String to a Endpoint.
        Parameters:
        endpoint - a drasyl node endpoint represented as URI
        Returns:
        Endpoint converted from endpoint
        Throws:
        NullPointerException - if endpoint is null
        IllegalArgumentException - if endpoint is an invalid Endpoint or violates RFC 2396