java.lang.Object
de.iip_ecosphere.platform.support.http.Http

public abstract class Http extends Object
Generic access to HTTP. Requires an implementing plugin of type Http or an active HttpProviderDescriptor. Simplified interface akin to the Apache HTTP client.
Author:
Holger Eichelberger, SSE
  • Field Details

    • instance

      private static Http instance
  • Constructor Details

    • Http

      public Http()
  • Method Details

    • getInstance

      public static Http getInstance()
      Returns the Http instance.
      Returns:
      the instance
    • setInstance

      public static void setInstance(Http http)
      Manually sets the instance. Shall not be needed, but may be required in some tests.
      Parameters:
      http - the Http instance
    • createPost

      public abstract HttpPost createPost(String uri)
      Creates a POST request.
      Parameters:
      uri - the URI to address
      Returns:
      the post request
    • createClient

      public abstract HttpClient createClient()
      Creates a default client instance.
      Returns:
      the client instance
    • createPooledClient

      public abstract HttpClient createPooledClient()
      Creates a pooled client instance.
      Returns:
      the client instance