public class ADPAPIConnectionFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
private static ADPAPIConnectionFactory |
INSTANCE |
private static Logger |
LOGGER |
| Modifier | Constructor and Description |
|---|---|
private |
ADPAPIConnectionFactory()
constructor
|
| Modifier and Type | Method and Description |
|---|---|
ADPAPIConnection |
createConnection(ConnectionConfiguration connectionConfiguration)
this method returns an instance of Connection object based on the authorization configuration
|
private ADPAPIConnection |
createConnection(GrantType grantType,
ConnectionConfiguration connectionConfiguration)
Returns an instance of Connection object based on the authorization grant type
|
static ADPAPIConnectionFactory |
getInstance()
Returns a singleton instance of ADPAPIConnectionFactory class
|
ConnectionConfiguration |
init(String grantType)
Returns an instance of Configuration object based on the authorization grant type
|
private static ADPAPIConnectionFactory INSTANCE
private static final Logger LOGGER
public static ADPAPIConnectionFactory getInstance()
ADPAPIConnectionFactorypublic ConnectionConfiguration init(String grantType) throws ConnectionException
grantType - GrantTypeADPAPIConnectionConnectionException - throws a connection if grant type is empty or nullpublic ADPAPIConnection createConnection(ConnectionConfiguration connectionConfiguration) throws ConnectionException
connectionConfiguration - configuration associated to the connectionConnectionException - throws exception if configuration is null, invalidprivate ADPAPIConnection createConnection(GrantType grantType, ConnectionConfiguration connectionConfiguration) throws ConnectionException
grantTypeValue - ConnectionExceptionCopyright © 2016 ADP LLC. All rights reserved.