Class MaprHttpURL


  • public class MaprHttpURL
    extends java.lang.Object
    1. Returns a usable http(s) connection. 2. Caches a authentication token and re-uses it for connections long as it is valid. 3. Performs authentication via MaprAuthenticator only if the token becomes invalid.

    TODO(Santosh): 1. This code is not cluster aware (it always watches if security is enabled or not on the current cluster) 2. This code is not user aware (MaprAuthenticator will pickup creds of the process uid that's running this code)

    Author: smarella

    • Constructor Summary

      Constructors 
      Constructor Description
      MaprHttpURL()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.net.HttpURLConnection openConnection​(java.net.URL url)  
      • Methods inherited from class java.lang.Object

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

      • MaprHttpURL

        public MaprHttpURL()
    • Method Detail

      • openConnection

        public static java.net.HttpURLConnection openConnection​(java.net.URL url)
                                                         throws java.io.IOException
        Throws:
        java.io.IOException