Package org.javlo.service.syncro
Class HttpClientService
- java.lang.Object
-
- org.javlo.service.syncro.HttpClientService
-
public class HttpClientService extends Object
Service managing all http request to a javlo server.- Author:
- bdumont
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpClientService.HttpClientServiceClientConnectionManagerFactory
-
Constructor Summary
Constructors Constructor Description HttpClientService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.http.StatusLine
callURL(String relativeURL)
String
downloadAsString(String relativeURL)
String
encodeURL(String relativeURL)
org.apache.http.HttpResponse
execute(org.apache.http.client.methods.HttpUriRequest request)
org.apache.http.impl.client.DefaultHttpClient
getClient()
org.apache.http.protocol.HttpContext
getContext()
String
getPassword()
String
getProxyHost()
Integer
getProxyPort()
String
getServerURL()
String
getSynchroCode()
String
getUsername()
String
retrieveRemoteLoginId()
void
safeConsume(org.apache.http.HttpResponse resp)
protected void
setClient(org.apache.http.impl.client.DefaultHttpClient client)
void
setPassword(String password)
void
setProxyHost(String proxyHost)
void
setProxyPort(Integer proxyPort)
void
setServerURL(String serverURL)
void
setSynchroCode(String synchroCode)
void
setUsername(String username)
-
-
-
Field Detail
-
lock
public final Object lock
-
-
Method Detail
-
getServerURL
public String getServerURL()
-
setServerURL
public void setServerURL(String serverURL)
-
getSynchroCode
public String getSynchroCode()
-
setSynchroCode
public void setSynchroCode(String synchroCode)
-
getUsername
public String getUsername()
-
setUsername
public void setUsername(String username)
-
getPassword
public String getPassword()
-
setPassword
public void setPassword(String password)
-
getProxyHost
public String getProxyHost()
-
setProxyHost
public void setProxyHost(String proxyHost)
-
getProxyPort
public Integer getProxyPort()
-
setProxyPort
public void setProxyPort(Integer proxyPort)
-
getClient
public org.apache.http.impl.client.DefaultHttpClient getClient()
-
getContext
public org.apache.http.protocol.HttpContext getContext()
-
setClient
protected void setClient(org.apache.http.impl.client.DefaultHttpClient client)
-
downloadAsString
public String downloadAsString(String relativeURL) throws IOException
- Throws:
IOException
-
callURL
public org.apache.http.StatusLine callURL(String relativeURL) throws org.apache.http.client.ClientProtocolException, IOException
- Throws:
org.apache.http.client.ClientProtocolException
IOException
-
execute
public org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest request) throws org.apache.http.client.ClientProtocolException, IOException
- Throws:
org.apache.http.client.ClientProtocolException
IOException
-
safeConsume
public void safeConsume(org.apache.http.HttpResponse resp)
-
retrieveRemoteLoginId
public String retrieveRemoteLoginId() throws IOException
- Throws:
IOException
-
-