Class HttpConnectionUtil

java.lang.Object
org.red5.server.util.HttpConnectionUtil

public class HttpConnectionUtil extends Object
Utility for using HTTP connections.
Author:
The Red5 Project, Paul Gregoire (mondain@gmail.com)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static final org.apache.http.client.HttpClient
    Returns a client with all our selected properties / params.
    static final org.apache.http.client.HttpClient
    getClient(int timeout)
    Returns a client with all our selected properties / params.
    int
     
    static final org.apache.http.client.HttpClient
    Returns a client with all our selected properties / params and SSL enabled.
    static void
    handleError(org.apache.http.HttpResponse response)
    Logs details about the request error.
    void
    setConnectionTimeout(int connectionTimeout)
     

    Methods inherited from class java.lang.Object

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

    • HttpConnectionUtil

      public HttpConnectionUtil()
  • Method Details

    • getClient

      public static final org.apache.http.client.HttpClient getClient()
      Returns a client with all our selected properties / params.
      Returns:
      client
    • getClient

      public static final org.apache.http.client.HttpClient getClient(int timeout)
      Returns a client with all our selected properties / params.
      Parameters:
      timeout - - socket timeout to set
      Returns:
      client
    • getSecureClient

      public static final org.apache.http.client.HttpClient getSecureClient()
      Returns a client with all our selected properties / params and SSL enabled.
      Returns:
      client
    • handleError

      public static void handleError(org.apache.http.HttpResponse response) throws org.apache.http.ParseException, IOException
      Logs details about the request error.
      Parameters:
      response - http response
      Throws:
      IOException - on IO error
      org.apache.http.ParseException - on parse error
    • getConnectionTimeout

      public int getConnectionTimeout()
      Returns:
      the connectionTimeout
    • setConnectionTimeout

      public void setConnectionTimeout(int connectionTimeout)
      Parameters:
      connectionTimeout - the connectionTimeout to set