org.ektorp.spring
Class HttpClientFactoryBean

java.lang.Object
  extended by org.ektorp.spring.HttpClientFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<HttpClient>

public class HttpClientFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean<HttpClient>

FactoryBean that produces a HttpClient. Configuration parameters are set through @Value annotations. The application context must define properties along the line of:

Author:
henrik lundgren

Field Summary
 boolean autoUpdateViewOnChange
           
 boolean caching
           
 boolean cleanupIdleConnections
           
 int connectionTimeout
           
 boolean enableSSL
           
 String host
           
 int maxCacheEntries
           
 int maxConnections
           
 int maxObjectSizeBytes
           
 String password
           
 int port
           
 boolean relaxedSSLSettings
           
 int socketTimeout
           
 boolean testConnectionAtStartup
           
 String url
           
 String username
           
 
Constructor Summary
HttpClientFactoryBean()
           
 
Method Summary
 HttpClient getObject()
           
 Class<? extends HttpClient> getObjectType()
           
 boolean isSingleton()
           
 void setAutoUpdateViewOnChange(boolean b)
           
 void setCaching(boolean caching)
           
 void setCleanupIdleConnections(boolean cleanupIdleConnections)
           
 void setConnectionTimeout(int connectionTimeout)
           
 void setEnableSSL(boolean enableSSL)
           
 void setHost(String host)
           
 void setMaxCacheEntries(int maxCacheEntries)
           
 void setMaxConnections(int maxConnections)
           
 void setMaxObjectSizeBytes(int maxObjectSizeBytes)
           
 void setPassword(String s)
           
 void setPort(int port)
           
 void setProperties(Properties p)
           
 void setRelaxedSSLSettings(boolean relaxedSSLSettings)
           
 void setSocketTimeout(int socketTimeout)
           
 void setSslSocketFactory(org.apache.http.conn.ssl.SSLSocketFactory sslSocketFactory)
           
 void setTestConnectionAtStartup(boolean b)
           
 void setUrl(String url)
           
 void setUsername(String user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

public String url

host

public String host

port

public int port

maxConnections

public int maxConnections

connectionTimeout

public int connectionTimeout

socketTimeout

public int socketTimeout

autoUpdateViewOnChange

public boolean autoUpdateViewOnChange

username

public String username

password

public String password

testConnectionAtStartup

public boolean testConnectionAtStartup

cleanupIdleConnections

public boolean cleanupIdleConnections

enableSSL

public boolean enableSSL

relaxedSSLSettings

public boolean relaxedSSLSettings

caching

public boolean caching

maxCacheEntries

public int maxCacheEntries

maxObjectSizeBytes

public int maxObjectSizeBytes
Constructor Detail

HttpClientFactoryBean

public HttpClientFactoryBean()
Method Detail

getObject

public HttpClient getObject()
                     throws Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean<HttpClient>
Throws:
Exception

getObjectType

public Class<? extends HttpClient> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean<HttpClient>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean<HttpClient>

setAutoUpdateViewOnChange

public void setAutoUpdateViewOnChange(boolean b)

setUsername

public void setUsername(String user)

setPassword

public void setPassword(String s)

setTestConnectionAtStartup

public void setTestConnectionAtStartup(boolean b)

setSslSocketFactory

public void setSslSocketFactory(org.apache.http.conn.ssl.SSLSocketFactory sslSocketFactory)

setHost

public void setHost(String host)

setPort

public void setPort(int port)

setMaxConnections

public void setMaxConnections(int maxConnections)

setConnectionTimeout

public void setConnectionTimeout(int connectionTimeout)

setSocketTimeout

public void setSocketTimeout(int socketTimeout)

setCleanupIdleConnections

public void setCleanupIdleConnections(boolean cleanupIdleConnections)

setEnableSSL

public void setEnableSSL(boolean enableSSL)

setRelaxedSSLSettings

public void setRelaxedSSLSettings(boolean relaxedSSLSettings)

setCaching

public void setCaching(boolean caching)

setMaxCacheEntries

public void setMaxCacheEntries(int maxCacheEntries)

setMaxObjectSizeBytes

public void setMaxObjectSizeBytes(int maxObjectSizeBytes)

setUrl

public void setUrl(String url)

setProperties

public void setProperties(Properties p)


Copyright © 2011. All Rights Reserved.