Class HttpServer

  • class HttpServer
    extends java.lang.Object
    An HTTP server for static content used to allow worker nodes to access JARs.

    Based on Spark HttpServer, wraps a Jetty server.

    • Field Summary

      Modifier and Type Field Description
      private static java.lang.String localIpAddress  
      private int port  
      private resourceBase  
      private org.eclipse.jetty.server.Server server  
    • Constructor Summary

      Constructor Description
      HttpServer​( resourceBase)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.String findLocalIpAddress()  
      private static <E> java.lang.Iterable<E> iterable​(java.util.Enumeration<E> enumeration)  
      (package private) static java.lang.String localIpAddress()
      Get the local host's IP address in dotted-quad format (e.g.
      private static void logWarning​(java.lang.String s)  
      (package private) void start()  
      (package private) void stop()  
      (package private) java.lang.String uri()
      Returns the URI of this HTTP server ("http://host:port").
      • Methods inherited from class java.lang.Object

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

      • localIpAddress

        private static java.lang.String localIpAddress
      • resourceBase

        private final resourceBase
      • server

        private org.eclipse.jetty.server.Server server
      • port

        private int port
    • Constructor Detail

      • HttpServer

        HttpServer​( resourceBase)
    • Method Detail

      • start

        void start()
      • stop

        void stop()
      • uri

        java.lang.String uri()
        Returns the URI of this HTTP server ("http://host:port").
      • localIpAddress

        static java.lang.String localIpAddress()
        Get the local host's IP address in dotted-quad format (e.g. Note, this is typically not used from within core spark.
      • findLocalIpAddress

        private static java.lang.String findLocalIpAddress()
      • iterable

        private static <E> java.lang.Iterable<E> iterable​(java.util.Enumeration<E> enumeration)
      • logWarning

        private static void logWarning​(java.lang.String s)