public interface ClientFactory
Clients. In most cases, implementations should cache the client they return
from getClient(uk.co.visalia.brightpearl.apiclient.account.Account) and support returning the same instance in response
to subsequent calls. If the underlying HTTP client does not support connection pooling or any other form of cached
resources for improved performance, implementations may instead return a new client for each request.Client getClient(Account account)
Get a client to be used for a given Account. This method will be called
for every request to be made to the Brightpearl API, so that client instances that support only a single request
are supported. Implementations may return the same instance in response to multiple calls to this method, and
should do so provided the client is thread-safe and supports multiple concurrent requests.
Creating a client for each customer account is not recommended but can be used as a method of throttling the resources available to each account, so the account is included as a parameter to allow this.
account - The Brightpearl customer account a client is required for.Copyright © 2014. All Rights Reserved.