Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.paypal.base;

ConnectionManager acts as a interface to retrieve HttpConnection objects used by API service
 
 public final class ConnectionManager {

Singleton instance
	private static ConnectionManager instance;
	// Private Constructor
	private ConnectionManager() {
	}

Singleton accessor method

Returns:
ConnectionManager singleton object
	public static ConnectionManager getInstance() {
		synchronized (ConnectionManager.class) {
			if ( == null) {
			}
		}
		return ;
	}

Returns:
HttpConnection object
		return new DefaultHttpConnection();
	}

Overloaded method used factory to load GoogleAppEngineSpecific connection

Parameters:
httpConfig HttpConfiguration object
Returns:
HttpConnection object
		if (httpConfig.isGoogleAppEngine()) {
else {
			return new DefaultHttpConnection();
		}
	}
New to GrepCode? Check out our FAQ X