Package com.onlinepayments
Class Client
java.lang.Object
com.onlinepayments.ApiResource
com.onlinepayments.Client
- All Implemented Interfaces:
ClientInterface,LoggingCapable,ObfuscationCapable,Closeable,AutoCloseable
-
Field Summary
Fields inherited from class com.onlinepayments.ApiResource
clientMetaInfo, communicator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases any system resources associated with this object.voidUtility method that delegates the call to this client's communicator.voidcloseIdleConnections(long idleTime, TimeUnit timeUnit) Utility method that delegates the call to this client's communicator.voidTurns off logging.voidenableLogging(CommunicatorLogger communicatorLogger) Turns on logging using the given communicator logger.Resource /v2/{merchantId}voidsetBodyObfuscator(BodyObfuscator bodyObfuscator) Sets the current non-nullbody obfuscator to use.voidsetHeaderObfuscator(HeaderObfuscator headerObfuscator) Sets the current non-nullheader obfuscator to use.withClientMetaInfo(String clientMetaInfo) Returns a new ClientInterface instance which uses the passed meta data for the X-GCS-ClientMetaInfo header.Methods inherited from class com.onlinepayments.ApiResource
getClientHeaders, instantiateUri
-
Constructor Details
-
Client
-
-
Method Details
-
withClientMetaInfo
Returns a new ClientInterface instance which uses the passed meta data for the X-GCS-ClientMetaInfo header.- Specified by:
withClientMetaInfoin interfaceClientInterface- Parameters:
clientMetaInfo- JSON string containing the meta data for the client
-
closeIdleConnections
Utility method that delegates the call to this client's communicator.- Specified by:
closeIdleConnectionsin interfaceClientInterface- See Also:
-
closeExpiredConnections
public void closeExpiredConnections()Utility method that delegates the call to this client's communicator.- Specified by:
closeExpiredConnectionsin interfaceClientInterface- See Also:
-
setBodyObfuscator
Description copied from interface:ObfuscationCapableSets the current non-nullbody obfuscator to use.- Specified by:
setBodyObfuscatorin interfaceObfuscationCapable
-
setHeaderObfuscator
Description copied from interface:ObfuscationCapableSets the current non-nullheader obfuscator to use.- Specified by:
setHeaderObfuscatorin interfaceObfuscationCapable
-
enableLogging
Description copied from interface:LoggingCapableTurns on logging using the given communicator logger.- Specified by:
enableLoggingin interfaceLoggingCapable
-
disableLogging
public void disableLogging()Description copied from interface:LoggingCapableTurns off logging.- Specified by:
disableLoggingin interfaceLoggingCapable
-
close
Releases any system resources associated with this object.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
merchant
Resource /v2/{merchantId}- Specified by:
merchantin interfaceClientInterface- Parameters:
merchantId- String- Returns:
- MerchantClientInterface
-