code: private static CommunicationHandler newHandlerPreference(String handlerProp,
  			String url, String user, String pass,
  			SSLSocketFactory sslSocketFactory, HostnameVerifier verifier, int initialConnectionTimeout)
  					throws InitializationException {
  		if (handlerProp == null) {
  			throw new NullPointerException();
  		}
  
  		if (handlerProp.equals("java")) {
  			return new JavaCommunicationHandler(url, user, pass,
  					sslSocketFactory, verifier, initialConnectionTimeout);
  		} else if (handlerProp.equals("apache")) {
  			try {
  				return new ApacheCoreCommunicationHandler(url, user, pass,
  						sslSocketFactory, verifier, initialConnectionTimeout);
  			} catch (NoClassDefFoundError e) {
  				throw new InitializationException("Could not initialize ApacheCommunicationHandler");
  			}
  		} else {
  			throw new InitializationException("Invalid " + HANDLER_PROPERTY + " value");
  		}
  	}
docs: Helper to return the handler which is indicated by handlerProp
  
  @param handlerProp
  @param url
  @param user
  @param pass
  @param sslSocketFactory
  @param verifier
  @param initialConnectionTimeout the initial connection timeout in milliseconds
  @return
  @throws InitializationException