Class STUNResolver.STUNService

    • Constructor Summary

      Constructors 
      Constructor Description
      STUNService()
      Default constructor, without name and port.
      STUNService​(java.lang.String hostname, int port)
      Basic constructor, with the hostname and port
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean checkBinding()
      Check a binding with the STUN currentServer.
      java.lang.String getHostname()
      Get the host name of the STUN service.
      int getPort()
      Get the port of the STUN service
      boolean isNull()
      Basic format test: the service is not null.
      void setHostname​(java.lang.String hostname)
      Set the hostname of the STUN service.
      void setPort​(int port)
      Set the port number for the STUN service.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • STUNService

        public STUNService​(java.lang.String hostname,
                           int port)
        Basic constructor, with the hostname and port
        Parameters:
        hostname - The hostname
        port - The port
      • STUNService

        public STUNService()
        Default constructor, without name and port.
    • Method Detail

      • getHostname

        public java.lang.String getHostname()
        Get the host name of the STUN service.
        Returns:
        The host name
      • setHostname

        public void setHostname​(java.lang.String hostname)
        Set the hostname of the STUN service.
        Parameters:
        hostname - The host name of the service.
      • getPort

        public int getPort()
        Get the port of the STUN service
        Returns:
        The port number where the STUN server is waiting.
      • setPort

        public void setPort​(int port)
        Set the port number for the STUN service.
        Parameters:
        port - The port number.
      • isNull

        public boolean isNull()
        Basic format test: the service is not null.
        Returns:
        true if the hostname and port are null
      • checkBinding

        public boolean checkBinding()
        Check a binding with the STUN currentServer. Note: this function blocks for some time, waiting for a response.
        Returns:
        true if the currentServer is usable.