Class NetworkDiagnostics

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class NetworkDiagnostics
    extends java.util.Observable
    implements java.lang.AutoCloseable
    • Field Detail

      • OS_STATUS_UNKNOWN

        public static final java.lang.String OS_STATUS_UNKNOWN
        See Also:
        Constant Field Values
      • OS_STATUS_BADFCVERSION

        public static final java.lang.String OS_STATUS_BADFCVERSION
        See Also:
        Constant Field Values
      • OS_STATUS_THIRDPARTY

        public static final java.lang.String OS_STATUS_THIRDPARTY
        See Also:
        Constant Field Values
    • Constructor Detail

      • NetworkDiagnostics

        protected NetworkDiagnostics​(boolean isUnitTest,
                                     int unitTestMtuSize)
      • NetworkDiagnostics

        public NetworkDiagnostics​(java.lang.String host,
                                  int port,
                                  boolean useSSL,
                                  boolean enableAuth,
                                  java.util.function.Supplier<ClientCredentials> credentials,
                                  boolean useServlet,
                                  java.lang.String servletLocation)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • testControl

        public void testControl()
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRTT

        public long testRTT()
                     throws java.lang.Exception
        Calculates time for a round trip to server, returns time in milliseconds.
        Returns:
        rtt round trip time in millis
        Throws:
        java.lang.Exception
      • testPacketLoss

        public double testPacketLoss()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testPacketLoss

        public double testPacketLoss​(int packetSize,
                                     int numPackets,
                                     int rate)
                              throws java.lang.Exception
        Parameters:
        packetSize -
        numPackets -
        rate -
        Returns:
        loss percentage of packets lost
        Throws:
        java.lang.Exception
      • getMaxSupportedUnitSize

        public int getMaxSupportedUnitSize()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testSingleStreamTCPDataConnections

        public boolean testSingleStreamTCPDataConnections()
      • testSingleStreamTCPDataConnections

        public boolean testSingleStreamTCPDataConnections​(boolean portFallback)
      • testMultiStreamTCPDataConnections

        public boolean testMultiStreamTCPDataConnections()
      • isFirewallBlockingOutgoingUDP

        public boolean isFirewallBlockingOutgoingUDP()
      • isFileCatalystServer

        public boolean isFileCatalystServer()
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isFirewallBlockingIncomingUDP

        public boolean isFirewallBlockingIncomingUDP​(int udpPort)
      • quitTestEngine

        protected void quitTestEngine​(FCClientEngine test)
                               throws java.io.IOException,
                                      unlimited.core.util.common.exception.FCException
        Throws:
        java.io.IOException
        unlimited.core.util.common.exception.FCException
      • getTestEngine

        protected FCClientEngine getTestEngine()
                                        throws java.io.IOException,
                                               unlimited.core.util.common.exception.FCException
        Throws:
        java.io.IOException
        unlimited.core.util.common.exception.FCException
      • getTestEngine

        protected FCClientEngine getTestEngine​(boolean useEnableAuth)
                                        throws java.io.IOException,
                                               unlimited.core.util.common.exception.FCException
        Throws:
        java.io.IOException
        unlimited.core.util.common.exception.FCException
      • getPathMTU

        public int getPathMTU​(java.lang.String host)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • calculateOptimalDiskParameters

        public int[] calculateOptimalDiskParameters​(int rtt,
                                                    int maxBandwidth)
      • testPacket

        public boolean testPacket​(java.lang.String host,
                                  int packetSize)
                           throws java.lang.Exception
        Test if a packet of the given size can travel to the destination unfragmented
        Parameters:
        host - destination
        packetSize - Size of packet in bytes INCLUDING the 8 byte ICMP header and the 20 byte IP header
        Returns:
        true if the packetsize can be sent unfragmented, false otherwise
        Throws:
        java.lang.Exception
      • getProgress

        public int getProgress()
      • getStatus

        public java.lang.String getStatus()
      • setClientConnectKey

        public void setClientConnectKey​(java.lang.String clientConnectKey)
      • getClientIdentifier

        public int getClientIdentifier()
        Returns:
        the clientIdentifier
      • setClientIdentifier

        public void setClientIdentifier​(int clientIdentifier)
        Parameters:
        clientIdentifier - the clientIdentifier to set
      • getClientSubIdentifier

        public int getClientSubIdentifier()
      • setClientSubIdentifier

        public void setClientSubIdentifier​(int clientSubIdentifier)
      • getHost

        public java.lang.String getHost()
      • isSupportsUDP

        public boolean isSupportsUDP()
        Returns:
        the supportsUDP
      • getSiteOS

        public java.lang.String getSiteOS()
      • getAgentID

        public java.lang.String getAgentID()
      • setUnitTest

        protected void setUnitTest​(boolean ut)
      • setUnitTestMTU

        protected void setUnitTestMTU​(int mtu)
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable