Package akka.testkit

Class SocketUtil

  • public class SocketUtil
    extends java.lang.Object
    Utilities to get free socket address.
    • Constructor Detail

      • SocketUtil

        public SocketUtil()
    • Method Detail


        public static java.lang.String RANDOM_LOOPBACK_ADDRESS()
      • temporaryLocalPort

        public static int temporaryLocalPort​(boolean udp)
        A port on 'localhost' that is currently available
      • temporaryLocalPort

        public static int temporaryLocalPort​(SocketUtil.Protocol protocol)
        Find a free local post on 'localhost' that is available on the given protocol If both UDP and TCP need to be free specify Both
      • temporaryLocalPort$default$1

        public static boolean temporaryLocalPort$default$1()
      • temporaryServerAddress

        public static temporaryServerAddress​(java.lang.String address,
                                                                        boolean udp)
        address - host address. If not set, a loopback IP from the range is picked
        udp - if true, select a port that is free for running a UDP server. Otherwise TCP.
        an address (host+port) that is currently available to bind on
      • temporaryServerAddress$default$1

        public static java.lang.String temporaryServerAddress$default$1()
      • temporaryServerAddress$default$2

        public static boolean temporaryServerAddress$default$2()
      • temporaryServerAddresses

        public static scala.collection.immutable.IndexedSeq<> temporaryServerAddresses​(int numberOfAddresses,
                                                                                                                 java.lang.String hostname,
                                                                                                                 boolean udp)
      • temporaryServerAddresses$default$2

        public static java.lang.String temporaryServerAddresses$default$2()
      • temporaryServerAddresses$default$3

        public static boolean temporaryServerAddresses$default$3()
      • temporaryServerHostnameAndPort

        public static scala.Tuple2<java.lang.String,​java.lang.Object> temporaryServerHostnameAndPort​(java.lang.String interface_)
      • temporaryServerHostnameAndPort$default$1

        public static java.lang.String temporaryServerHostnameAndPort$default$1()
      • temporaryUdpIpv6Port

        public static int temporaryUdpIpv6Port​( iface)
      • notBoundServerAddress

        public static notBoundServerAddress​(java.lang.String address)
      • notBoundServerAddress

        public static notBoundServerAddress()