sdk/src/com/socialize/net/DefaultHttpClientFactory.java
@Override
	public void init(SocializeConfig config) throws SocializeException  {
		
		try {
			if(logger != null && logger.isDebugEnabled()) {
				logger.debug("Initializing " + getClass().getSimpleName());
			}
			
	        params = new BasicHttpParams();
	        HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
	        HttpProtocolParams.setContentCharset(params, HTTP.UTF_8);
	        
	        HttpConnectionParams.setConnectionTimeout(params, config.getIntProperty(SocializeConfig.HTTP_CONNECTION_TIMEOUT, 10000));
	        HttpConnectionParams.setSoTimeout(params, config.getIntProperty(SocializeConfig.HTTP_SOCKET_TIMEOUT, 10000));
	        
	        SchemeRegistry registry = new SchemeRegistry();
	        registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
	        registry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));

	        connectionManager = new ThreadSafeClientConnManager(params, registry);
	        
	        monitor = new IdleConnectionMonitorThread(connectionManager);
	        monitor.setDaemon(true);
	        monitor.start();
	        
	        if(logger != null && logger.isDebugEnabled()) {
				logger.debug("Initialized " + getClass().getSimpleName());
			}
	        
	        destroyed = false;
		}
		catch (Exception e) {
			throw new SocializeException(e);
		}
	}
@Override
	public void init(SocializeConfig config) throws SocializeException  {
		
		try {
			if(logger != null && logger.isDebugEnabled()) {
				logger.debug("Initializing " + getClass().getSimpleName());
			}
			
	        params = new BasicHttpParams();
	        HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
	        HttpProtocolParams.setContentCharset(params, HTTP.UTF_8);
	        
	        HttpConnectionParams.setConnectionTimeout(params, config.getIntProperty(SocializeConfig.HTTP_CONNECTION_TIMEOUT, 10000));
	        HttpConnectionParams.setSoTimeout(params, config.getIntProperty(SocializeConfig.HTTP_SOCKET_TIMEOUT, 10000));
	        
	        SchemeRegistry registry = new SchemeRegistry();
	        registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
	        registry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));

	        connectionManager = new ThreadSafeClientConnManager(params, registry);
	        
	        monitor = new IdleConnectionMonitorThread(connectionManager);
	        monitor.setDaemon(true);
	        monitor.start();
	        
	        if(logger != null && logger.isDebugEnabled()) {
				logger.debug("Initialized " + getClass().getSimpleName());
			}
	        
	        destroyed = false;
		}
		catch (Exception e) {
			throw new SocializeException(e);
		}
	}
@ Override public void init ( SocializeConfig config ) throws SocializeException { try { if ( logger != null && logger . isDebugEnabled ( ) ) { logger . debug ( "Initializing " + getClass ( ) . getSimpleName ( ) ) ; } params = new BasicHttpParams ( ) ; HttpProtocolParams . setVersion ( params , HttpVersion . HTTP_1_1 ) ; HttpProtocolParams . setContentCharset ( params , HTTP . UTF_8 ) ; HttpConnectionParams . setConnectionTimeout ( params , config . getIntProperty ( SocializeConfig . HTTP_CONNECTION_TIMEOUT , 10000 ) ) ; HttpConnectionParams . setSoTimeout ( params , config . getIntProperty ( SocializeConfig . HTTP_SOCKET_TIMEOUT , 10000 ) ) ; SchemeRegistry registry = new SchemeRegistry ( ) ; registry . register ( new Scheme ( "http" , PlainSocketFactory . getSocketFactory ( ) , 80 ) ) ; registry . register ( new Scheme ( "https" , SSLSocketFactory . getSocketFactory ( ) , 443 ) ) ; connectionManager = new ThreadSafeClientConnManager ( params , registry ) ; monitor = new IdleConnectionMonitorThread ( connectionManager ) ; monitor . setDaemon ( true ) ; monitor . start ( ) ; if ( logger != null && logger . isDebugEnabled ( ) ) { logger . debug ( "Initialized " + getClass ( ) . getSimpleName ( ) ) ; } destroyed = false ; } catch ( Exception e ) { throw new SocializeException ( e ) ; } }
/* (non-Javadoc)
@see com.socialize.net.HttpClientFactory#init()
/ * ( non - Javadoc )