public interface ADPAPIConnection
ADPAPIConnection is an interface for all Connection Types instantiated based
on GrantType which allows an application to configure connections
ADPAPIConnection exposes the common methods that are available for connection types.
AuthorizationCodeConnection,
ClientCredentialsConnection| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Initiates a connect request to ADP Authorization Server or Token Server based
on the type of connection configuration.
|
void |
disconnect()
Invokes API to disconnect the connection - currently this method is
implemented to reset the connection to null
|
Token |
getToken()
Returns a Token associated with this connection
|
boolean |
isConnectionIndicator()
Returns true by verifying if token is present in the connection and
if token is not expired since time of issue.
|
void connect()
throws ConnectionException
Initiates a connect request to ADP Authorization Server or Token Server based
on the type of connection configuration. Validations are performed on the
connection configurations and if request is valid access token will be issued
and Token is mapped with this connection. In case of error,
connection exceptions are thrown or error details are returned
ConnectionException - A connection exception is thrown in case of
incomplete configuration,invalid configurations
data passed or server errorvoid disconnect()
throws ConnectionException
ConnectionException - A connection exception is thrown in case of
incomplete configuration,invalid configurations
data passed or server errorToken getToken()
Tokenboolean isConnectionIndicator()
Copyright © 2016 ADP LLC. All rights reserved.