Class UptimeClient


  • public final class UptimeClient
    extends java.lang.Object
    Connects to a server periodically to measure and print the uptime of the server. This example demonstrates how to implement reliable reconnection mechanism in Netty.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static java.lang.String HOST  
      (package private) static int PORT  
      (package private) static int READ_TIMEOUT  
      (package private) static int RECONNECT_DELAY  
    • Constructor Summary

      Constructors 
      Constructor Description
      UptimeClient()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

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

      • HOST

        static final java.lang.String HOST
      • PORT

        static final int PORT
      • RECONNECT_DELAY

        static final int RECONNECT_DELAY
      • READ_TIMEOUT

        static final int READ_TIMEOUT
    • Constructor Detail

      • UptimeClient

        public UptimeClient()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception