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 classHttpClientService.HttpClientServiceClientConnectionManagerFactory
-
Constructor Summary
Constructors Constructor Description HttpClientService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.http.StatusLinecallURL(String relativeURL)StringdownloadAsString(String relativeURL)StringencodeURL(String relativeURL)org.apache.http.HttpResponseexecute(org.apache.http.client.methods.HttpUriRequest request)org.apache.http.impl.client.DefaultHttpClientgetClient()org.apache.http.protocol.HttpContextgetContext()StringgetPassword()StringgetProxyHost()IntegergetProxyPort()StringgetServerURL()StringgetSynchroCode()StringgetUsername()StringretrieveRemoteLoginId()voidsafeConsume(org.apache.http.HttpResponse resp)protected voidsetClient(org.apache.http.impl.client.DefaultHttpClient client)voidsetPassword(String password)voidsetProxyHost(String proxyHost)voidsetProxyPort(Integer proxyPort)voidsetServerURL(String serverURL)voidsetSynchroCode(String synchroCode)voidsetUsername(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.ClientProtocolExceptionIOException
-
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.ClientProtocolExceptionIOException
-
safeConsume
public void safeConsume(org.apache.http.HttpResponse resp)
-
retrieveRemoteLoginId
public String retrieveRemoteLoginId() throws IOException
- Throws:
IOException
-
-