Package org.red5.server.util
Class HttpConnectionUtil
java.lang.Object
org.red5.server.util.HttpConnectionUtil
Utility for using HTTP connections.
- Author:
- The Red5 Project, Paul Gregoire (mondain@gmail.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final org.apache.http.client.HttpClientReturns a client with all our selected properties / params.static final org.apache.http.client.HttpClientgetClient(int timeout) Returns a client with all our selected properties / params.intstatic final org.apache.http.client.HttpClientReturns a client with all our selected properties / params and SSL enabled.static voidhandleError(org.apache.http.HttpResponse response) Logs details about the request error.voidsetConnectionTimeout(int connectionTimeout)
-
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 errororg.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
-